Css Study - 纵向Menu - By html and Css
http://www.wikihow.com/Create-a-Dropdown-Menu-in-HTML-and-CSS
HTML
<div id="leftmenu">
<ul>
<li><a href="#">Home</a></li>
<li class='has-sub'><a href="#">PRODUCTS</a>
<ul>
<li class='has-sub'><a href="#">Sub Product1</a>
<ul>
<li </a>
</li>
<li </a></li>
</ul>
</li>
<li class='no-sub'><a href="#">Sub Product2</a></li>
</ul>
</li>
</ul>
</div>
CSS
<style>
/* Starter CSS for Flyout Menu */
#leftmenu {
padding: ;
margin: ;
border: ;
}
#leftmenu ul,
li {
list-style: none;
margin: ;
padding: ;
}
#leftmenu ul {
position: relative;
z-index: ;
float: left;
}
#leftmenu ul li {
float: left;
height: 38px;
line-height: 38px;
width: 200px;
vertical-align: middle;
}
#leftmenu ul li.hover,
#leftmenu ul li:hover {
position: relative;
z-index: ;
cursor: default;
}
#leftmenu ul ul {
visibility: hidden;
position: absolute;
top: %;
left: ;
z-index: ;
width: %;
}
#leftmenu ul ul li {
float: none;
}
#leftmenu ul li:hover > ul {
visibility: visible;
}
#leftmenu ul ul {
top: ;
left: %;
}
#leftmenu ul li {
float: none;
}
/* Custom Stuff */
#leftmenu {
border-radius: 5px;
background-clip: padding-box;
box-shadow: 2px 1px rgba(, , , 0.15);
width: 160px;
}
#leftmenu span,
#leftmenu a {
display: inline-block;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
text-decoration: none;
border-bottom: solid 1px rgba(, , , 0.15);
}
#leftmenu:after,
#leftmenu ul:after {
content: '';
display: block;
clear: both;
}
#leftmenu > ul > li ul ul {
border-radius: 6px 6px ;
background-clip: padding-box;
background-color: #ffffff;
}
#leftmenu ul,
#leftmenu li {
background-color: #4cb6ea;
font-weight: bold;
width: %;
}
#leftmenu li {
height: 25px;
line-height: 25px;
}
#leftmenu a {
color: #ffffff;
line-height: %;
padding: 8px 20px 8px 20px;
width: 120px;
font-size: 16px;
}
#leftmenu a:hover {
color: #;
background: #ffffff;
}
#leftmenu ul ul {
width: 160px;
border: 1px solid #dddddd;
background: #ffffff;
}
#leftmenu ul ul li {
background: #ffffff;
}
#leftmenu ul ul li a {
color: #;
}
#leftmenu ul ul li a:hover {
color: #ff006e;
}
#leftmenu .has-sub {
position: relative;
}
#leftmenu ul .has-sub a:before {
display: block;
content: "";
border: 6px solid transparent;
border-left-color: #eee;
z-index: ;
height: ;
width: ;
position: absolute;
right: 12px;
top: -2px;
}
#leftmenu .has-sub:hover a:before {
border-left-color: #;
}
#leftmenu .has-sub:hover ul li a:before {
display: none;
}
#leftmenu .has-sub:hover .has-sub a:before {
display: block;
}
#leftmenu .has-sub:hover .has-sub:hover a:before {
border-left-color: #ff006e;
}
#leftmenu .has-sub:hover .has-sub:hover ul li a:before,
#leftmenu .no-sub a:before,
#leftmenu .no-sub:hover a:before {
display: none;
}
</style>
Css Study - 纵向Menu - By html and Css的更多相关文章
- Css Study - 横向MENU
http://cssmenumaker.com/menu/tabbed-chrome-and-blue HTML <div id="topMenu"> <ul&g ...
- Css Study - Top Menu in Header 横向间隔的菜单
.shortcut ul li { display: inline; } CSS <style> ol, ul { list-style: none; } html, body, ul, ...
- HTML+CSS+jQuery 纵向导航 && 横向导航 && 消除IE6 BUG && 感悟怎样学习
<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content ...
- 纯CSS二级纵向菜单
纯CSS二级纵向菜单 <body> <div class="divda"> <div class="nav"> <ul ...
- CSS+JS下拉菜单和纯CSS下拉菜单
下拉菜单 (思路:先把二级定位到屏幕外,鼠标悬停重新定位回来:另一个就是ul浮动,li也浮动) 下拉菜单的一般思路就是把子导航嵌套在无序列表中,把列表定位到屏幕之外,当鼠标悬停在其父列表项上时,重新定 ...
- DIV+CSS专题:十天学会DIV+CSS
DIV+CSS专题:十天学会DIV+CSS,在网上看到的.感觉蛮好,推荐一下. 十天学会DIV+CSS(WEB标准)CHM格式文件下载 第十天 div+css网页标准布局实例教程(三) 第十天 div ...
- CSS系列:在HTML中引入CSS的方法
HTML与CSS是两个作用不同的语言,它们同时对一个网页产生作用,因此必须将CSS与HTML链接在一起使用.在HTML中,引入CSS的方法主要有4种:行内式.内嵌式.导入式和链接式. 1. 行内式 行 ...
- html学习第二天—— 第九、十章——CSS的继承、层叠和特殊性+CSS格式化排版
继承CSS的某些样式是具有继承性的,那么什么是继承呢?继承是一种规则,它允许样式不仅应用于某个特定html标签元素,而且应用于其后代.比如下面代码:如某种颜色应用于p标签,这个颜色设置不仅应用p标签, ...
- CSS Shake – 摇摆摇摆!动感的 CSS 抖动效果
CSS Shake 是一套 CSS3 动画特效,让页面的 DOM 元素实现各种效果的抖动(Shake),这些效果可以轻松的被应用到按钮.LOGO 以及图片等元素.所有这些效果都是只需要单一的标签,加上 ...
随机推荐
- Save vtkImageData to BMP Image 保存vtkImageData为图片
在VTK中,我们有时候想要保存vtkImageData类的变量到一幅图片,可以使用如下的实例代码: #include <vtkBMPReader.h> #include <vtkBM ...
- Load Mental Ray in Maya 2015
In Maya 2015, we usually use mental ray to render our model, some new users may not see the mental r ...
- Linux_Shell
一.Shell 种类与归属 Unix与Linux常见的Shell脚本解释器有bash,sh,csh,ksh等(PS: bash 完全兼容sh) bash : linux 默认的shell sh : u ...
- Odoo Xml Datetime 类型显示为 Date类型
<field name='date_order' widget='date'/> 利用date widget即可使dateime类型的显示为date.
- 弹出层js让DIV居中
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- 把应用程序exe 注册成为windows 服务的方法
由于在Windows 服务器上必须要启动一个软件,提供外网访问内网的客户端软件,但是由于每次远程服务器之后会注销当前用户,所以客户端软件就会自动退出,那么我在外网的系统就不能支持访问了. 解决方案:将 ...
- BootStrap 模态框基本用法
<!DOCTYPE html> <html> <head> <title>Bootstrap 实例 - 模态框(Modal)插件方法</title ...
- 2016HUAS暑假集训训练2 K - Hero
题目链接:http://acm.hust.edu.cn/vjudge/contest/121192#problem/K 这也是一道贪心题,刚开始写时以为只要对每一敌人的攻击和血的乘积进行从小到大排序即 ...
- 2016HUAS暑假集训题1 H - N皇后问题
Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上. 你的任务是,对于给定的N,求出有多少种合 ...
- SVN :This XML file does not appear to have any style information associated with it.
SVN :This XML file does not appear to have any style information associated with it. The document tr ...