css菜单悬浮提示效果代码
代码语言:html
所属分类:悬停
代码描述:css菜单悬浮提示效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style> @charset "utf-8"; * { margin: 0; padding: 0; } body { background: #005094; font: 12px Verdana, Arial, Helvetica, sans-serif; } a:focus { outline: none; } .demopage { margin: 0 auto; width: 510px; background: #005094; overflow: hidden; padding: 20px; } /* sidenav */ ul.sidenav { float: left; margin: 130px 0 0; padding: 0; width: 200px; list-style: none; border-bottom: 1px solid #3373a9; border-top: 1px solid #003867; font-size: 1.2em; } ul.sidenav li { position: relative; float: left; margin: 0; padding: 0; } ul.sidenav li a { border-top: 1px solid #3373a9; border-bottom: 1px solid #003867; padding: 10px 10px 10px 25px; display: block; color: #fff; text-decoration: none; width: 165px; background: #005094 url(../images/sidenav_li_a.gif) no-repeat 5px 10px; position: relative; z-index: 2; } ul.sidenav li a:hover, ul.sidenav li a.current { background-color: #004c8d; border-top: 1px solid #1a4c76; } ul.sidenav li div { display: none; position: absolute; top: 2px; left: 0; width: 225px; font-size: 12px; background: white; border-radius: 10px; } ul.sidenav li div p { margin: 7px 0; line-height: 1.6em; padding: 0 10px; } </style> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("ul.sidenav li").hover(function() { $(this).find("div").stop(.........完整代码请登录后点击上方下载按钮下载查看
网友评论0