* { list-style:none; text-decoration:none; padding:0; margin:0 } /* 导航栏 */ .top_nav_two { width:100%; height:65px; } .top_nav_two ul { margin:auto; width:1200px; height:100%; padding:0; list-style:none; background-color:#e64650; } .top_nav_two ul li { display:inline-block; list-style:none; margin-left:37px; text-size:17px; text-align:center; font-family:MicrosoftYaHei; font-weight:400; color:rgba(255,255,255,1); } .top_nav_two ul li a { text-decoration:none; color:#fff; } .top_nav_two ul li .top_nav_two_span { height:0px; display:inline-block; margin-top:20px; background:rgba(255,255,255,1); } .top_nav_two ul li:hover .top_nav_two_span { height:2px; } /* 滚动文字 */ .winBox { width:1150px; height:40px; overflow:hidden; margin:auto; position:relative; } .winBox1 { width:300px; height:40px; overflow:hidden; float:right; z-index:5; margin-right:15%; position:relative; } .scroll { /*width的大小是根据下面li的长度和多少个li而定的,需注意!*/ width:1700px; height:40px; position:absolute; left:0px; top:0px; } .scroll li { width:150px; float:left; line-height:40px; text-align:center; } /* 获取到funavc的第一个元素 */ .funav .funavc:first-child { position:absolute; width:100%; } /* 二级列表样式 */ .funav { position:relative; height:50px; background-color:#fff; } .funav li { height:100%; float:left; margin-right:30px; } .funav li a { display:block; height:48px; text-align:center; color:#4A4A4A; padding:0 10px; } .funav li a:hover { color:#E00000; } .funav .funavcur a { border-bottom:2px solid #E00000; } .funavc { position:relative; display:none; margin:auto; width:1200px; height:100%; color:#4A4A4A; font-size:14px; line-height:50px; } .funavc_1 { display:block; }
在网上发现二级菜单都要在父级导航下展示才可以,于是自己弄了个二级位置固定的导航,因为我是用的jq3.1以上的版本,在这里貌似有点bug,导航那在这里有点抖动,在我本地没有发现,