一款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

时间: 2024-08-02 09:07:22

一款javascript实现的超炫的下拉选择框的相关文章

JavaScript学习笔记之下拉选择框的操作

对于下拉框的操作十分繁多,这几天项目需要就总结一下 一.动态构建option 有时候我们需要动态构建下拉选择框里面的值,这里我们就要用到 var varItem = new Option("文本","值");构建一个或多个<option value="值">文本</option> var varItem = new Option("studentName","name"); 例子1:

android仿微信红包动画、Kotlin综合应用、Xposed模块、炫酷下拉视觉、UC浏览器滑动动画等源码

Android精选源码 仿微信打开红包旋转动画 使用Kotlin编写的Android应用,内容你想象不到 Android手机上的免Root Android系统日志Viewer 一个能让微信 Material Design 化的 Xposed 模块 仿最新版微信 Rxjava+Retrofit+MVP+Glide 技术开发 android一键清理/内存加速,缓存清理,自启管理,软件管理 android打造酷炫下拉视差效果并解决各种滑动冲突源码 android实现UC浏览器首页滑动动画实现 andr

jQuery和CSS3超酷二级下拉菜单插件

这是一款效果很酷又简单实用的jQuery二级下拉菜单特效,该特效在点击触发按钮后,二级下拉菜单会向下滑动覆盖原来的主菜单,关闭后二级下拉菜单又向上滑动回去,二级菜单不占用多余的空间. 这个菜单插件是替代标准的二级下拉菜单的好方法,特别是在你想显示更多的二级子菜单的时候.另外,你可以十分容易的自定义二级下拉菜单的样式,多添加一个搜索框或登录注册表单等等. 在线演示:http://www.htmleaf.com/Demo/201502271428.html 下载地址:http://www.htmle

一款好看的可以插入图片的下拉控件

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <title></title>   

超炫酷的jQuery/HTML5应用效果及源码

jQuery非常强大,我们之前也用jQuery分享过很多实用的插件.HTML5可以让网页变得更加绚丽多彩,将HTML5和jQuery结合使用那将发挥更棒的效果. 今天向大家收集了一些关于HTML5和jQuery的应用及其源码,一起来看看. HTML5动感的火焰燃烧动画特效 这又是一款基于HTML5的超炫动画特效,是一款动感的火焰燃烧动画效果.这款HTML5动画火焰燃烧非常逼真. 核心jQuery代码: $( document ).ready(function() { // Set canvas

基于Animate.css的炫酷jQuery消息通知框插件

notification是一款基于Animate.css的炫酷jQuery消息通知框插件.该插件可以在屏幕的四个角显示消息通知框,结合Animate.css可以制作出多种效果非常炫酷的CSS3动画特效. 在线预览   源码下载 使用方法 使用该jQuery消息通知框插件需要引入jQuery,notification.js,animate.css和notification.css文件. <link rel='stylesheet' href='css/animate.min.css'> <

10款超炫的开源jquery的源码预览效果

1.Flat Surface Shader – 超炫的 3D 模拟照明效果 Flat Surface Shader 是一个超炫的 3D 模拟照明效果,可以配置使用基于 Canvas 的 2D 上下文或者基于 SVG 多边形数组绘制三角形.它还采用原生的 Float32Arrays 存储数字数据,进行高度优化的计算.可以调整颜色参数预览效果,而且可以导出图像. 在线演示 源码下载 2.Sidr – 创建侧栏和响应式菜单的最佳 jQuery 插件 侧栏隐藏菜单是一个很好的方式,使得用户可以在需要的时

一款由jquery实现的超炫的页面加载特效

今天为大家带来一款由jquery实现的超炫的页面加载特效.连续的几个页面分开特效.最后由三维的线条由远至近消失,然后由近至远出现.效果超级梦炫.一起看下效果图: 在线预览   源码下载 实现的代码. html代码: <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 1200 600"> <line id="uno" x1="600" y1="0

你见过吗?9款超炫的复选框(Checkbox)效果

复选框(Checkbox)在各个浏览器中的效果不一致,因此很多 Web 开发人员会自己重新设计一套界面和使用体验都更佳的复选框功能.下面就给大家分享9款超炫的复选框(Checkbox)效果,纯 CSS3 实现,未使用任何图片. 温馨提示:为保证最佳的效果,请在 IE10+.Chrome.Firefox 和 Safari 等现代浏览器中浏览. 前面三款效果都是灵感来自移动应用程序的滑动选择框效果,在选择和未选择状态之间通过滑动来切换效果,非常的动感.效果的实现方面是借用了一个 DIV 标签和一个