200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > 打造最美CSS多级下拉横向导航菜单代码分享

打造最美CSS多级下拉横向导航菜单代码分享

时间:2024-08-03 16:57:57

相关推荐

打造最美CSS多级下拉横向导航菜单代码分享

web前端|css教程

css 导航菜单

web前端-css教程

本文实例为大家分享了纯CSS实现多级下拉横向导航菜单代码,供大家参考,具体内容如下

贴吧云签源码,ubuntu查看全部历史,tomcat启动出黄叉,ccs小爬虫,图片分页php,seo销售顾问是干什么的lzw

先看看效果图:

维博招生系统源码,vscode avr,ubuntu pppd,tomcat durid,手机版本sqlite,新加波服务器租用,图片分享插件下载,前端框架12讲,爬虫 加载更多,php删除字符串中指定字符,湖南seo培训,滑动 手机网站 代码,制作网页软件下载,bootstrap 管理模板下载,好看404页面,学生综合管理系统v1.0,程序始终在最前面lzw

网页游戏分销平台源码,vscode怎么用node,ubuntu权限 禁止,如何查看tomcat内存,爬虫headers,php 代码分离,西乡seo培训选哪个,php企业网站下载,一周要闻模板lzw

实现代码:

CSS代码:

/* for this demo only */ #backgroundHolder { width:750px; height:500px; padding-top:10px; margin:0 auto; } /* ---------------------------------------------------------------------------- */ /* default styling */ .nav, .nav ul { list-style-type:none; margin:0; padding:0; } .nav a { text-decoration:none; } .nav { font-family: arial, sans-serif; font-size:12px; width:650px; margin:0 auto; } /* style the links */ .nav a { background:url(ulmulti3/box.jpg) no-repeat rightright center; } .nav a.top { background:url(ulmulti3/box.jpg) no-repeat rightright top; } .nav a.top2 { background:url(ulmulti3/box2.jpg) no-repeat rightright top; } .nav a.bottombottom { background:url(ulmulti3/box.jpg) no-repeat rightright bottombottom; } .rightright ul ul a { background:url(ulmulti3/box3.jpg) no-repeat rightright center; } .rightright ul ul a.top2 { background:url(ulmulti3/box3.jpg) no-repeat rightright top; } .rightright ul ul a.bottombottom { background:url(ulmulti3/box3.jpg) no-repeat rightright bottombottom; } /* style the element so that is does not affect the size of the link */ .nav a b { color:#fff; font-weight:normal; display:block; padding:5px 10px 5px 15px; } .nav .fly .main b { background: transparent url(ulmulti3/arrow.jpg) no-repeat 117px 9px; } .nav .down b { background: transparent url(ulmulti3/arrow2.jpg) no-repeat 115px 11px; } .nav .rightright ul b { text-align:rightright; } .nav .rightright ul ul b { padding: 5px 15px 5px 10px; } .nav .rightright ul .main b { background: transparent url(ulmulti3/arrow3.jpg) no-repeat 15px 9px; text-align:rightright; } .nav .rightright ul ul .main b { background: transparent url(ulmulti3/arrow3.jpg) no-repeat 5px 9px; text-align:rightright; } /* HEIGHT */ .nav ul ul { top:-24px; } /* position the top of the flyout first sub menus */ .nav ul ul ul { top:-25px; } /* position the top of the flyout second and third sub menus */ .nav ul.two { top:-40px; } /* position the top of the flyout sub menus with previous text on two lines */ /* WIDTH change this WITH CARE to suit your requirements *//*set the link width here*/ .nav .drop, .nav a { width:130px; } .nav ul li { max-width:130px; } /* fix for IE8 */ /* set the left flyout position here */ .nav ul ul { left:130px; } /* set the right flyout position here */ .nav li.rightright ul ul { left:auto; rightright:120px; } .nav li.rightright ul ul ul { left:auto; rightright:130px; } /* make this WIDTH - 1px */ /* or WIDTH - 0.063em if using em sizing */ .nav a { margin-right:-129px; } /* ---------------------------------------------------------------------------- *//* DO NOT CHANGE ANYTHING BELOW */ .nav li { float:left; } /* fixes IE bugs, and allows for clearing */ .nav ul { float:left; position:relative; z-index:20; } /* necessary for float drop and to stack the s */ .nav ul li { clear:left; } /* must clear the floated list item inside sublist */ .nav a { position:relative; display:block; } /* needs to have a position, to be above the rest */ .nav a.main { float:left; /* necessary for float drop */ margin-top:10000px; } /* bring the top level links back into view */ .nav .drop, .nav .fly { margin-top:-10000px; } /* hide the sub links and their containers, opera has low upper limits */ .nav ul { margin-bottom:-5000px; } /* avoid any interaction between the subs, can be any large size */ /* The bit that does ALL the work to bring the sub menus into view */.nav a:hover, .nav a:focus, .nav a:active { margin-right:0; z-index:10; outline:0; } .nav a:hover b, .nav a:focus b, .nav a:active b { color:#000; cursor:pointer; } /* this is for keyboard tabbing color change */ /* OPERA fix */ .nav ul:hover, .nav ul ul:hover { clear:left; } /* to stop intermittent sub link :hover problems *//* ---------------------------------------------------------------------------- */ /* bug fixes for IE7 and lower - DO NOT CHANGE */ .nav .fly {width:99%;} /* make each flyout 99% of the prevous level */ a:active {} /* requires a blank style for :active to stop it being buggy */

html代码:

HomeEquipment CamerasFilm Type Compact Polaroid Digital Digital SLR Canon Nikon Panasonic Kodak Second Hand Video Cameras & AccessoriesLatest Models Nikon Panasonic Canon Pentax Minolta Special Offers Professional LensesDigital Standard Telephoto Wide Angle ZoomNikonPentaxMinoltaPanasonic Zoom with MacroPanasonicMinoltaPentaxCanonNikon Fisheye x2 converters Standard SLR Canon Nikon Panasonic Pentax Minolta Cases Large Format Hasselblad Arca-Swiss Leica Lens Hoods Lens Cleaners TripodsFlashgunsAccessories, filters & lens coversSpecial OffersElectronicsAccessories FlashgunsDigital Cameras Nikon Canon Panasonic Pentax Kodak Film Cameras Reflectors Stands Remote Control Batteries FiltersUltra Violet Lens protection Yellow Red Orange Blue Remote ControlCanon Nikon Pentax Camera CasesPentax Nikox Canon Pentax Kodak Minolta Lens BrushOutlets SupportBuyingPhotographersStockistCurrys Dixons Jessops Staples GeneralSalesUSA CANADA South America Europe Britain France Germany Spain Italy Australia Asia Privacy Policy

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。