HTML CSS3 手风琴菜单
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/style.css" media="screen" type="text/css" />
</head>
<body>
<div style="text-align: center; clear: both">
</div>
<ul>
<li class="block">
<input type="checkbox" name="item" id="item1" />
<label for="item1"><i aria-hidden="true" class="icon-users"></i>Friends </label>
<ul class="options">
<li><a href="htttp:www.baidu.com"><i aria-hidden="true" class="icon-search"></i>Find New Friends</a></li>
<li><a href="#"><i aria-hidden="true" class="icon-point-right"></i>Poke A Friend</a></li>
<li><a href="#"><i aria-hidden="true" class="icon-fire"></i>Incinerate Existing Friends</a></li>
</ul>
</li>
<li class="block">
<input type="checkbox" name="item" id="item2" />
<label for="item2"><i aria-hidden="true" class="icon-film"></i>Videos </label>
<ul class="options">
<li><a href="#"><i aria-hidden="true" class="icon-movie"></i>My Videos </a></li>
<li><a href="#"><i aria-hidden="true" class="icon-download"></i>My Downloaded Videos </a></li>
<li><a href="#"><i aria-hidden="true" class="icon-warning"></i>My Well Dodgy Videos </a></li>
</ul>
</li>
<li class="block">
<input type="checkbox" name="item" id="item3" />
<label for="item3"><i aria-hidden="true" class="icon-images"></i>Galleries </label>
<ul class="options">
<li><a href="#" target="_blank"><i aria-hidden="true" class="icon-deviantart"></i>My Deviant Art</a></li>
<li><a href="#" target="_blank"><i aria-hidden="true" class="icon-dribbble"></i>Latest Dribbble Images</a></li>
<li><a href="#" target="_blank"><i aria-hidden="true" class="icon-flickr"></i>Sample Flickr Stream</a></li>
<li><a href="#" target="_blank"><i aria-hidden="true" class="icon-picassa"></i>Sample Picasa Stream</a></li>
</ul>
</li>
<li class="block">
<input type="checkbox" name="item" id="item4" />
<label for="item4"><i aria-hidden="true" class="icon-microphone"></i>Podcasts </label>
<ul class="options">
<li><a href="#" target="_blank"><i aria-hidden="true" class="icon-music"></i>CSS-Tricks</a></li>
</ul>
</li>
<li class="block">
<input type="checkbox" name="item" id="item5" />
<label for="item5"><i aria-hidden="true" class="icon-android"></i>Robots </label>
<ul class="options">
<li><a href="#" target="_blank"><i aria-hidden="true" class="icon-eye"></i>Hal 9000</a></li>
<li><a href="#" target="_blank"><i aria-hidden="true" class="icon-cloud"></i>Skynet</a></li>
<li><a href="#" target="_blank"><i aria-hidden="true" class="icon-reddit"></i>Johnny 5</a></li>
</ul>
</li>
</ul>
</body>
</html>
CSS:
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
} body {
font-family:arial, sans-serif;
font-weight:normal;
font-size:12px;
background:#3f4348 url('http://www.frecosse.com/workshop/accordion_menu/bg.png');
} ul {
list-style:none;
margin:0;
padding:0;
width:300px;
margin:0 auto;
-moz-box-shadow: 0 0 5px #111;
-webkit-box-shadow: 0 0 5px #111;
box-shadow: 0 0 5px #111;
} ul li label {
background: #575e63; /* fallback colour */
border-top:1px solid #878e98;
border-bottom:1px solid #33373d;
color: #fff;
text-shadow: 0 1px 1px #000;
letter-spacing: 0.09em;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#575e63), to(#3f4347));
background: -webkit-linear-gradient(top, #575e63, #3f4347);
background: -moz-linear-gradient(top, #575e63, #3f4347);
background: -ms-linear-gradient(top, #575e63, #3f4347);
background: -o-linear-gradient(top, #575e63, #3f4347);
} ul li input[type='checkbox'] {
display: none;
} ul li label {
display:block;
padding:12px;
width:300px;
} ul li i {
font-size:18px;
vertical-align: middle;
width:20px;
display:inline-block;
} ul li span {
display:inline;
float:right;
background:#48515c;
border:1px solid #3c434c;
border-bottom:1px solid #707781;
padding:4px 6px;
font-size:10px;
-moz-border-radius: 12px;
border-radius: 12px;
-moz-box-shadow: inset 0 0 10px #111;
-webkit-box-shadow: inset 0 0 10px #111;
box-shadow: inner 0 0 10px #111;
position:relative;
} ul li label:hover {
background: #566f82; /* fallback colour */
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#566f82), to(#3e505e));
background: -webkit-linear-gradient(top, #566f82, #3e505e);
background: -moz-linear-gradient(top, #566f82, #3e505e);
background: -ms-linear-gradient(top, #566f82, #3e505e);
background: -o-linear-gradient(top, #566f82, #3e505e);
} ul li label:hover span {
background:#3e505e;
} ul li input[type='checkbox']:checked ~ label {
color:orange ;
background: #44c6eb; /* fallback colour */
border-top:1px solid #878e98;
border-bottom:1px solid #2799db;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#44c6eb), to(#2799db));
background: -webkit-linear-gradient(top, #44c6eb, #2799db);
background: -moz-linear-gradient(top, #44c6eb, #2799db);
background: -ms-linear-gradient(top, #44c6eb, #2799db);
background: -o-linear-gradient(top, #44c6eb, #2799db);
} ul li input[type='checkbox']:checked ~ label span {
background: #2173a1; /* fallback colour */
border-top:1px solid #1b5f85;
border-bottom:1px solid #4cb1e4;
-moz-box-shadow: inset 0 0 5px #111;
-webkit-box-shadow: inset 0 0 5px #111;
box-shadow: inner 0 0 5px #111;
} ul li input[type='checkbox']:checked ~ .options {
height: auto;
display:block;
min-height:40px;
max-height:400px;
} ul ul {
background:#fff; margin:0; padding:0;
-moz-box-shadow: inset 0 2px 2px #b3b3b3;
-webkit-box-shadow: inset 0 2px 2px #b3b3b3;
box-shadow: inner 0 2px 2px #b3b3b3;
} ul ul li a {
display:block;
padding:6px 12px;
color:#999;
text-decoration:none;
} ul ul li a:hover {
color:#44c6eb;
} ul ul li a span {
color:#999;
background:none;
border:1px solid #ccc;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
} ul ul li {
border-bottom:1px solid #ccc;
} ul ul li:first-child {
padding-top:6px;
} ul ul li:last-child {
padding-bottom:6px; border:0;
} .options {
height: 0;
display: block;
overflow: hidden;
} /* Abridged icomoon font styles
/* (Hosted on Frecosse - Please don't hotlink!)
===============================================
@font-face {
font-family: 'icomoon';
src:url('http://www.frecosse.com/workshop/accordion_menu/icomoon.eot');
src:url('http://www.frecosse.com/workshop/accordion_menu/icomoon.eot?#iefix') format('embedded-opentype'),
url('http://www.frecosse.com/workshop/accordion_menu/icomoon.woff') format('woff'),
url('http://www.frecosse.com/workshop/accordion_menu/icomoon.ttf') format('truetype'),
url('http://www.frecosse.com/workshop/accordion_menu/icomoon.svg#icomoon') format('svg');
font-weight: normal;
font-style: normal;
} .icon-music:before, .icon-search:before, .icon-fire:before, .icon-dribbble:before, .icon-flickr:before, .icon-deviantart:before, .icon-picassa:before, .icon-reddit:before, .icon-android:before, .icon-users:before, .icon-film:before, .icon-eye:before, .icon-point-right:before, .icon-microphone:before, .icon-download:before, .icon-warning:before, .icon-images:before, .icon-movie:before, .icon-cloud:before {
font-family: 'icomoon';
speak: none;
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
.icon-music:before { content: "\61"; }
.icon-search:before { content: "\62"; }
.icon-fire:before { content: "\63"; }
.icon-dribbble:before { content: "\64"; }
.icon-flickr:before { content: "\65"; }
.icon-deviantart:before { content: "\66"; }
.icon-picassa:before { content: "\67"; }
.icon-reddit:before { content: "\68"; }
.icon-android:before { content: "\69"; }
.icon-users:before { content: "\6a"; }
.icon-film:before { content: "\6b"; }
.icon-eye:before { content: "\6c"; }
.icon-point-right:before { content: "\6d"; }
.icon-microphone:before { content: "\6e"; }
.icon-download:before { content: "\6f"; }
.icon-warning:before { content: "\70"; }
.icon-images:before { content: "\71"; }
.icon-movie:before { content: "\72"; }
.icon-cloud:before { content: "\73"; }*/
HTML CSS3 手风琴菜单的更多相关文章
- CSS3手风琴菜单 可同时折叠多个菜单
在线演示 本地下载
- 19款绚丽实用的jQuery/CSS3侧边栏菜单
jQuery作为一款主流的JavaScript前端开发框架,深受广告开发者的亲睐,同时jQuery有着不计其数的插件,特别是菜单插件更为丰富,本文将要为大家介绍20个绚丽而实用的jQuery侧边栏菜单 ...
- 大饱眼福 7款类型各异的CSS3实用菜单
1.清新小图标的HTML5/CSS3侧边栏菜单 前我们分享过几款CSS3侧边栏菜单,像CSS3侧边栏菜单 带可爱的小图标菜单和CSS3侧边栏手风琴菜单,都非常不错.今天我们要分享的这款CSS3侧边栏菜 ...
- 近20个绚丽实用的jQuery/CSS3侧边栏菜单(转载)
http://developer.51cto.com/art/201510/493530.htm 近20个绚丽实用的jQuery/CSS3侧边栏菜单 jQuery作为一款主流的JavaScript前端 ...
- 炫酷实用的CSS3代码垂直手风琴菜单
今天在微博上看到别人分享的代码,自己拿来自己保存着. 代码效果如下: 下面是源码: index.html <!DOCTYPE html> <html > <head> ...
- Angular.js+Bootstrap实现手风琴菜单
说是Angular.js+Bootstrap实现手风琴菜单,其实就是用了Bootstrap的样式而已. 上一篇实现了表格+分页,接着学习实现的Demo. 主要练习自定义指令,向指令中传递参数,老规矩先 ...
- jQuery简单的手风琴菜单
查看效果:http://keleyi.com/keleyi/phtml/menu/5.htm 本菜单的HTML代码和JS代码都简洁,完整源代码: <!DOCTYPE html PUBLIC &q ...
- 11款样式新颖的 jQuery/CSS3 网页菜单
今天为大家准备了11款样式风格挺不错的jQuery/CSS3网页菜单,主要包括面包屑菜单.下拉菜单.Tab菜单等,喜欢的朋友赶紧收藏,一起来看看这些菜单. 1.jQuery / CSS3多功能下拉菜单 ...
- 我收集到的最好的jQuery和CSS3导航菜单
jQuery和CSS3导航菜单在网页设计和开发的重要组成部分之一.利用jQuery+CSS3实现可以做出拥有各种动画效果的漂亮菜单.在这里,我们收集了一些最好的jQuery+CSS3实现的导航菜单. ...
随机推荐
- Ubuntu下编程环境GNU安装
ubuntu下C编程 环境搭建 其实,linux下写C也是很容易的.IDE的话用 eclipse 集成 CDT 模块就行了.当然这属于重量级的了,就如同VC++之于windows一样.那有没有像T ...
- cocos2d下,优秀骨骼spine的换装思路
语文老师说,文章要有个好开头!!! 最近正在引入spine骨骼代替dragon bone骨骼,既然要替代,那么原先在dragon bone上的一些额外需求,不管dragon bone上能不能实现,都应 ...
- 分析 "ADO" "ADODB" "ADODC" 之间的区别与联系
在敲学生信息管理系统的时候,通过查阅了解了一些关于 ADO / ADODB / ADODC / 的简单描述,想想将他们对 比着总结一下更容易理解记忆.尽管都是一些浅显的东西,不过对像我这样的菜鸟们还是 ...
- Pomodairo,番茄工作法-解刨篇
处于“信息大爆炸”的 e 时代的我们每天必定要处理很多的事情,不管是工作.学习.生活......面对这么多的纷杂的事物我们将如何应对?如何做到有条不紊的进行?高效.轻松.愉快的完成它呢?这时一款精致的 ...
- DOM文档对象总结
DOM总结: DOM:文档对象模型document object model DOM三层模型: DOM1:将HTML文档封装成对象 DOM2:将XML文档封装成对象 DOM3:将XML文档封装成对象 ...
- WPF解析TTF 字体
偶遇需要自己解析 TTF 字体并显示,此做... using System; using System.Collections.Generic; using System.Drawing.Text; ...
- shell date
.查看指定时间的时间戳 查看当前时间 #date +%s 查看指定时间 #date -d -- +%s #date -d +%s .将时间戳转换成date #date -d '1970-01-01 U ...
- Codeforces Round #311 (Div. 2) D. Vitaly and Cycle 奇环
题目链接: 点这里 题目 D. Vitaly and Cycle time limit per test1 second memory limit per test256 megabytes inpu ...
- EXT经验--查询EditorGridPanel的tbar的默认配置对象
前言:EXT的API可谓熟悉EXT的葵花宝典,会看API可谓对于配置EXT,学习EXT最重要的基本功,这点相对于学习轻量级的Easyui来说更加明显. 比如下面的一段代码:注:在Ext.grid.Ed ...
- PHP之set_error_handler()函数讲解
定义和用法 set_error_handler() 函数设置用户自定义的错误处理函数. 该函数用于创建运行时期间的用户自己的错误处理方法. 该函数会返回旧的错误处理程序,若失败,则返回 null. 语 ...