zoukankan      html  css  js  c++  java
  • 一款javascript实现的超炫的下拉选择框

    今天为给大家带来一款javascript实现的超炫的下拉选择框。下拉的列表由半用透明的幽灵按钮组成。显示下拉的时候,列表项由左右两侧飞入。消息时飞向左右两侧。一起看下效果图

    在线预览   源码下载

    实现的代码。

    html代码:

     <div class="scifiUI">
            <h1>
                Scifi Dropdown</h1>
            <ul>
                <li>Interactive</li>
                <li>Animated</li>
                <li>Scifi-styled</li>
                <li>Maintainable</li>
                <li>Scalability</li>
                <li>Cool</li>
                <li>Fun</li>
            </ul>
        </div>

    css代码:

      html, body
            {
                overflow: hidden;
                background: url(ironwall.jpg) #000 top center no-repeat;
                background-size: 100% 100%;
                width: 100%;
                height: 100%;
                font-family: 'Rajdhani' , sans-serif;
                font-size: 18px;
                letter-spacing: .1em;
            }
            
            .glow, .scifiUI:hover h1, .scifiUI:hover ul li
            {
                box-shadow: 0 0 25px #00dcdc, 0 1px 5px #212121;
                border-color: #00dcdc;
                background: #00dcdc;
                color: rgba(33, 33, 33, 0.7);
            }
            
            .scifiUI
            {
                width: 300px;
                margin: 100px auto;
            }
            .scifiUI:hover h1:after
            {
                border-top-color: rgba(33, 33, 33, 0.7);
            }
            .scifiUI:hover ul li
            {
                -ms-transform: skew(0);
                -webkit-transform: skew(0);
                transform: skew(0);
                width: 300px;
                height: 50px;
            }
            .scifiUI:hover ul li:nth-child(1)
            {
                left: 0;
            }
            .scifiUI:hover ul li:nth-child(2)
            {
                left: 0;
            }
            .scifiUI:hover ul li:nth-child(3)
            {
                left: 0;
            }
            .scifiUI:hover ul li:nth-child(4)
            {
                left: 0;
            }
            .scifiUI:hover ul li:nth-child(5)
            {
                left: 0;
            }
            .scifiUI:hover ul li:nth-child(6)
            {
                left: 0;
            }
            .scifiUI:hover ul li:nth-child(7)
            {
                left: 0;
            }
            .scifiUI *
            {
                -webkit-transition: all 300ms ease-in-out;
                transition: all 300ms ease-in-out;
            }
            .scifiUI h1
            {
                position: relative;
                display: block;
                width: 300px;
                height: 50px;
                line-height: 50px;
                border: 1px solid #00bebe;
                background: rgba(0, 190, 190, 0.2);
                color: #00bebe;
                font-size: 1.6em;
                text-align: center;
                cursor: pointer;
            }
            .scifiUI h1:after
            {
                content: '';
                display: block;
                position: absolute;
                top: 20px;
                right: 15px;
                border-top: 10px solid #00bebe;
                border-left: 10px solid transparent;
                border-right: 10px solid transparent;
                border-bottom: 0;
            }
            .scifiUI ul
            {
                list-style: none;
                position: relative;
                top: -20px;
            }
            .scifiUI ul li
            {
                -webkit-transform: skew(45deg) scaleY(-3);
                -ms-transform: skew(45deg) scaleY(-3);
                transform: skew(45deg) scaleY(-3);
                box-shadow: 0 3px 0 5px #212121 inset;
                position: absolute;
                display: block;
                width: 200px;
                height: 50px;
                line-height: 50px;
                border: 1px solid #00bebe;
                background: #00dcdc;
                text-align: center;
                font-size: 1.6em;
                cursor: pointer;
            }
            .scifiUI ul li:nth-child(1)
            {
                top: 0px;
                left: -500%;
            }
            .scifiUI ul li:nth-child(2)
            {
                top: 50px;
                left: 500%;
            }
            .scifiUI ul li:nth-child(3)
            {
                top: 100px;
                left: -500%;
            }
            .scifiUI ul li:nth-child(4)
            {
                top: 150px;
                left: 500%;
            }
            .scifiUI ul li:nth-child(5)
            {
                top: 200px;
                left: -500%;
            }
            .scifiUI ul li:nth-child(6)
            {
                top: 250px;
                left: 500%;
            }
            .scifiUI ul li:nth-child(7)
            {
                top: 300px;
                left: -500%;
            }
            .scifiUI ul li:hover
            {
                -webkit-transform: scale(1.08);
                -ms-transform: scale(1.08);
                transform: scale(1.08);
                font-size: 1.8em;
            }

    js这里引用的是angular.min.js

    注:本文爱编程原创文章,转载请注明原文地址:http://www.w2bc.com/Article/7325

  • 相关阅读:
    Xcode 4.1~4.6 + iOS 5、iOS 6免证书(iDP)开发+真机调试+生成IPA全攻略
    Java程序员快速入门Go语言
    企业站常用的点击后弹出下拉菜单导航
    企业站常用漂亮横向导航菜单
    点击弹出弹性下拉菜单效果
    很酷的伸缩导航菜单效果,可自定义样式和菜单项。
    导航条点击按钮切换效果
    不错的二级导航菜单特效
    商城常用产品分类导航条
    css实现鼠标经过导航文字偏位效果
  • 原文地址:https://www.cnblogs.com/liaohuolin/p/3992063.html
Copyright © 2011-2022 走看看