本文实例讲述了支持背景图片上下滑动的竖向jQuery菜单导航特效代码,分享给大家供大家参考。具体如下:
运行效果截图如下:
具体代码如下
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="gb2312"> <title>左边跟随鼠标滑动导航</title> <meta name="keywords" content="滑动导航" /> <meta name="description" content="左边跟随鼠标滑动导航" /> <style> /*---------重置---------*/ html { font-size: 100%; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; *overflow:auto; _overflow-x:hidden; } body { margin:0; } p, ul, ol, form, dl, h1, h2, h3, h4, h5, h6 { margin-top:0; margin-bottom:0; } dl, dd { margin-left:0; } ul, ol { padding-left:0; *margin-left:0; list-style-type: none; } ul li { *zoom:1; *vertical-align:bottom; } em, var, cite, i { font-style:normal; } small { font-size:inherit; } s, a { text-decoration:none; } :focus { outline:none; } blockquote, q { quotes:none; margin:0; } table { border-collapse:collapse; border-spacing:0; empty-cells:show;/*table-layout:fixed;*/ } img, iframe { border:none; } img { vertical-align: top; -ms-interpolation-mode: bicubic;/*ie7防止图片缩小失真的*/ } /*---------竖向菜单(非必需)---------*/ .bl-vernav li { border-bottom:1px solid #ddd; margin-bottom:-1px; padding-top:1px; } .bl-vernav a { display:block; height:20px; line-height:20px; padding:10px 16px; } .bl-vernav a:hover { background:#F8F8F8; text-decoration:none; } /*.bl-vernav .cur a{ background:#428BCA; color:#fff;}*/ .bl-vernav-ord { border:1px solid #ddd; } .vernav-level li li { border-left:none; border-right:none; } .vernav-level li li a { padding-left:40px; } .vernav-level .cur .one { background:#F8F8F8; } .vernav-level li .cur a { background:#F8F8F8; } /*diy*/ .bl-vernav-wrap { position:relative; } .bl-vernav-wrap .sideLine { position:absolute; left:-6px; top:0; z-index:1; line-height:0; font-size:0; border-left:#FF5F3E solid 7px; background-color:#F8F8F8; } .bl-vernav { position:relative; z-index:2; } .bl-vernav a:hover { background-color:transparent; } .demobox { width:460px; font-size:14px; color:#333; font-family:'Hiragino Sans GB', 'Microsoft Yahei', "WenQuanYi Micro Hei", SimSun, Tahoma, Arial, Helvetica, STHeiti; } a { color:#333; text-decoration:none; } </style> </head> <body style="padding:50px;"> <div class="demobox"> <h1 class="h3">左边条纹跟随鼠标滑动导航</h1> <br/> <div class="bl-vernav-wrap"> <div class="sideLine"></div> <ul class="bl-vernav vernav-level"> <li><a href="#" class="one">导航菜单</a></li> <li class="cur"> <a href="#" class="one">神探夏洛克</a> <ul> <li><a href="#">海贼王</a></li> <li><a href="#">海贼王</a></li> <li><a href="#">海贼王</a></li> </ul> </li> <li><a href="#" class="one">神探夏洛克</a></li> <li><a href="#" class="one">神探夏洛克</a></li> <li><a href="#" class="one">神探夏洛克</a></li> </ul> </div> </div> <script src="/UploadFiles/2021-04-02/jquery.min.js">希望本文所述对大家学习jquery程序设计有所帮助。
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“jquery背景跟随鼠标滑动导航”评论...