本例除了下面的这些代码还用了比较多的js文件,请看演示源码
XML/HTML Code
- <div id="container">
- <div id="navigation">
- <ul>
- <li><a href="">Home</a></li>
- <li><a href="http://www.freejs.net">freejs</a>
- <ul>
- <li><a href="http://www.freejs.net/daohangcaidan.html">导航菜单</a></li>
- <li><a href="http://www.freejs.net/tabbiaoqian.html">TAB标签</a></li>
- </ul>
- </li>
- <li><a href="/about">About</a></li>
- </ul>
- </div>
- </div>
JavaScript Code
- <script type="text/javascript">
- $(document).ready(function() {
- $("#navigation").dropSlideMenu({
- indicators: true, // adds a div to the list items for attaching indicators (arrows)
- clickstream: true, // highlights the clickstream in a menu by comparing the links to the current URL path
- openEasing: "easeOutQuad", // open animation effect
- closeEasing: "easeInQuad", // close animation effect
- duration: 600, // speed of drop down animation (in milliseconds)
- delay: 800, // delay before the drop down closes (in milliseconds)
- hideSelects: true // hide all select elements on the page when the menu is active (IE6 only)
- });
- });
- </script>
CSS Code
- /* first level > list */
- ul.ds {
- z-index: 1000;
- }
- /* first level > list items */
- ul.ds li {
- float: left;
- position: relative;
- margin: 0 0.5em 0 0;
- line-height: 1em;
- z-index: 1001;
- }
- /* first level > link style */
- ul.ds li a, ul.ds li a:visited {
- position: relative;
- display: block;
- padding: 0.7em 1em;
- line-height: 1em;
- text-decoration: none;
- color: #fff;
- background-color: #0f1923;
- }
- /* first level > link style > hover */
- ul.ds li a:hover {
- color: #5cbeff;
- background-color: #1a3855;
- }
- /* indicators */
- ul.ds li div.indicator {
- }
- ul.ds li div.indicator a {
- background-image: url("indicators.png");
- background-position: rightright 12px;
- background-repeat: no-repeat;
- }
- /* open state and hover style */
- ul.ds li.open div.indicator a, ul.ds li div.indicator a:hover {
- color: #5cbeff;
- background-color: #1a3855;
- background-position: rightright -140px;
- }
- /* second level > list */
- ul.ds li ul {
- position: absolute;
- left: 0;
- visibility: hidden;
- z-index: 1001;
- }
- /* second level > list items (override first level > list items) */
- ul.ds li ul li {
- float: none;
- margin: 0;
- /*display: inline;*/
- }
- /* second level > link style */
- ul.ds li ul li a, ul.ds li ul li a:visited {
- padding: 0.5em 1em;
- color: #eee !important;
- background-image: none;
- background-color: #0f1923;
- border-top: 1px solid #485d72;
- }
- /* individual styling of first list link style */
- ul#dsList-1 li a, ul#dsList-1 li a:visited {
- background-color: #5c0000;
- border-top: 1px solid #a74242;
- }
- /* second level > link style > hover */
- ul.ds li ul li a:hover {
- color: #ff91df !important;
- background-color: #480b36 !important;
- }
- /* clickstream */
- ul.ds li.clickstream a {
- color: #5cbeff;
- }
- ul.ds li.clickstream div.indicator a {
- background-position: rightright -64px;
- }
- ul.ds li.open.clickstream div.indicator a, ul.ds li.clickstream div.indicator a:hover {
- background-position: rightright -140px;
- }
- ul.ds li ul li.clickstream a {
- color: #5cbeff !important;
- background-color: #000 !important;
- }
- /* list item widths */
- li#dsListItem-1 {
- width: 7em;
- }
- li#dsListItem-2 {
- width: 10em;
- }
- li#dsListItem-3 {
- width: 7em;
- }
- /* list widths */
- ul#dsList-1 {
- width: 7em;
- }
- ul#dsList-2 {
- width: 10em;
- }
- ul#dsList-3 {
- width: 9em;
- }
- div.dsClear { /* to clear the floated list items */
- clear: both;
- height: 0;
- font-size: 0;
- line-height: 0;
- }
相关推荐
jQuery动画下拉菜单
jquery html5动画下拉菜单鼠标点击展开多级下拉菜单列表 jquery html5动画下拉菜单鼠标点击展开多级下拉菜单列表 jquery html5动画下拉菜单鼠标点击展开多级下拉菜单列表
jQuery个性动画二级下拉导航菜单基于jquery1.8.3.min.js制作,鼠标经过显示二级下拉菜单。
jQuery动画下拉菜单Smart Menu
jQuery动画效果三级下拉菜单,绝对好看,绝对超炫!
图形下拉菜单,jquery平滑动画菜单,jquery版本1.4.3,引自Google托管库,你也可以下载到本地。这款菜单是这样的:当你把鼠标移在按钮上的时候,点击按钮,会向下拉出一个带图形(图标)的菜单,图形可以起到美化...
jQuery变形动画导航下拉菜单代码是一款在菜单项之间切换时,下拉菜单会根据菜单内容的大小来动态变形,平滑过渡效果非常有趣。
jQuery钢琴动画效果的二级下拉导航菜单代码 jQuery钢琴动画效果的二级下拉导航菜单代码 jQuery钢琴动画效果的二级下拉导航菜单代码 jQuery钢琴动画效果的二级下拉导航菜单代码
jquery 滑动下拉效果菜单 动态滑动效果 非常漂亮
jQuery带动画效果的三级下拉菜单,导航菜单很炫哦,很酷
一款外观十分简洁好看的jQuery鼠标滑过导航下拉菜单特效,鼠标滑过一级导航菜单时,带过渡动画展开二级子菜单,鼠标悬停子菜单也会有简单的缩进动画效果,而且子菜单是多行多列形式布局,可以展示非常多的子菜单项。
jquery.dropdown是一款效果非常炫酷的select下拉菜单美化插件。这款jQuery下拉菜单美化插件能够使菜单选项一各种很炫的动画方式展现出来,其中的一些3d动画使用到了css3 3d动画效果。
黑色样式的jquery下拉菜单【两级菜单】,具有缓冲动画效果,在火狐或Chrome浏览器下,还可看到立体效果的菜单背景,并支持鼠标悬停响应效果,核心代码:CSS、jQuery、JavaScript。
用jquery实现的动画下拉效果 页脚提示 回到顶部 悬停 菜单固定位置
这是一款基于Bootstrap的炫酷下拉菜单鼠标滑过动画特效jQuery插件。该插件在鼠标滑过Bootstrap dropdown组件的时候,下拉面板会以指定的Animate.css中的CSS3动画出现。
今天我们要为大家分享一款基于jQuery和Bootstrap的垂直手风琴下拉菜单,因为它是Bootstrap风格的,所以外观上绝对可以称得上完美。另外,菜单项在展开的时候,菜单项的内容将会以飞入的动画特效展示出来,同时菜单项...
jQuery动画二级下拉菜单效果源码.zip
jquery变色动画下拉菜单.zip
jquery变色动画下拉菜单