今天为给大家带来一款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:;
}
.scifiUI:hover ul li:nth-child(2)
{
left:;
}
.scifiUI:hover ul li:nth-child(3)
{
left:;
}
.scifiUI:hover ul li:nth-child(4)
{
left:;
}
.scifiUI:hover ul li:nth-child(5)
{
left:;
}
.scifiUI:hover ul li:nth-child(6)
{
left:;
}
.scifiUI:hover ul li:nth-child(7)
{
left:;
}
.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:;
}
.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

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

  1. 【JavaScript&jQuery】单选框radio,复选框checkbox,下拉选择框select

    HTML: <!DOCTYPE html> <html> <head> <title></title> <meta charset=& ...

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

    对于下拉框的操作十分繁多,这几天项目须要就总结一下 一.动态构建option 有时候我们须要动态构建下拉选择框里面的值,这里我们就要用到 var varItem = new Option(" ...

  3. css3 炫酷下拉菜单

    <!doctype html> <html> <head> <meta charset="UTF-8"> <title> ...

  4. 揭秘Amazon反应速度超快的下拉菜单

    揭秘Amazon反应速度超快的下拉菜单 如果你以前觉得Amazon这家公司不太在用户体验上下功夫,这篇文章可能会改变你的看法. Amazon主页的左上角有一个商品分类浏览的下拉菜单.当鼠标从菜单中的选 ...

  5. 第一百四十六节,JavaScript,百度分享保持居中--下拉菜单

    JavaScript,百度分享保持居中--下拉菜单 百度分享保持居中 效果图 html代码 <div id="share"> <h2>分享到</h2& ...

  6. Javascript -- 示例:多选下拉选框

    1. 示例:多选下拉选框 <html> <head> <meta http-equiv="Content-Type" content="te ...

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

    Android精选源码 仿微信打开红包旋转动画 使用Kotlin编写的Android应用,内容你想象不到 Android手机上的免Root Android系统日志Viewer 一个能让微信 Mater ...

  8. 二、JavaScript语言--事件处理--DOM事件探秘--下拉菜单

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. 原生JavaScript写select下拉选择后跳转页面

    <select name="molsel_oprate" onchange="javascript:var obj = event.target; var inde ...

随机推荐

  1. 阿里云ESC搭建SVN服务端

    CentOS7)下yum命令快速安装svn服务端,学习在思考中独孤中度过,在孤独中进取! 01.SVN服务的安装(subversion) 02.ESC安全组策略 1.在线安装svn服务 $ sudo  ...

  2. @NotEmpty、@NotNull 和 @NotBlank 的区别

    1. 三者主要区别如下: @NotEmpty :用于集合类,不能为null,且size>0 @NotNull:不能为null,但可以为empty,没有size的约束 @NotBlank:只用于S ...

  3. iOS GCD中级篇 - dispatch_group的理解及使用

    上一篇GCD基础篇,以及同步.异步,并发.并行几个概率的理解 关于dispatch_group的概念以及几种场景下的使用 1.关于dispatch_group 把一组任务提交到队列中,这些队列可以不相 ...

  4. HDUOJ---Hamming Distance(4712)

    Hamming Distance Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others) ...

  5. 理解WEB标准

    WEB标准不是某一个标准,而是一系列标准的集合.网页主要由三部分组成:结构(Structure).表现(Presentation)和行为 (Behavior).对应的标准也分三方面:结构化标准语言主要 ...

  6. PC端轻松控制Android手机,PC Control Andoroid,PC控制安卓手机

    记录此次经历的目的是帮助需要的人或下次使用时少走弯路,我为此试用了不少工具及方法,因为追求免费,像"Weak Control:在PC上控制你的Android手机"还要收费的我就不弄 ...

  7. 阿里云ECS服务器Linux环境下配置php服务器(二)--phpMyAdmin篇

    上一篇讲了PHP服务器的基本配置,我们安装了apache,php,还有MySQL,最后还跑通了一个非常简单的php页面,有兴趣的朋友可以看我的这篇博客: 阿里云ECS服务器Linux环境下配置php服 ...

  8. C#代码规范 程序员必备的秘笈

    1.引言 本文是一套面向C# programmer和C# developer进行开发所应遵循的开发规范 按照此规范来开发C#程序可带来以下益处: 代码的编写保持一致性,提高代码的可读性和可维护性,在团 ...

  9. SDL的基础知识以及利用SDL播放视频

    原文地址:http://blog.csdn.net/i_scream_/article/details/52714378 此博文相关知识点从雷神的博客以及视频学习,截图也是用了他的课件, 雷神博客地址 ...

  10. python标准库介绍——25 errno 模块详解

    ==errno 模块== ``errno`` 模块定义了许多的符号错误码, 比如 ``ENOENT`` ("没有该目录入口") 以及 ``EPERM`` ("权限被拒绝& ...