导航列表的颜色为什么没有变呢。。
控制台里显示有颜色,但就是显示不出来。。子元素也没有设置背景色啊。。
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>慕多多</title> <link rel="stylesheet" href="css/reset.css"> <link rel="stylesheet" href="css/common.css"> <link rel="stylesheet" href="css/index.css"> </head> <body> <!-- 站点导航开始 --> <div class="nav-site"> <div class="container"> <ul class="fl"> <li class="fl"><a href="###" target="_blank" class="nav-site-login">亲,请登录</a></li> <li class="fl"><a href="###" target="_blank" class="nav-site-signup link">免费注册</a></li> <li class="fl"><a href="###" target="_blank" class="nav-site-mobile link">手机逛慕多多</a></li> </ul> <ul class="fr"> <li class="menu dropdown fl" data-active="menu"> <a href="###" target="_blank" class="dropdown-toggle link transition">我的慕多多<i class="dropdown-arrow icon transition"></i></a> <ul class="dropdown-layer dropdown-left"> <li><a href="###" target="_blank" class="menu-item">已买到的宝贝</a></li> <li><a href="###" target="_blank" class="menu-item">我的足迹</a></li> </ul> </li> <li class="menu dropdown fl" data-active="menu"> <a href="###" target="_blank" class="dropdown-toggle link transition">收藏夹<i class="dropdown-arrow icon transition"></i></a> <ul class="dropdown-layer dropdown-left"> <li><a href="###" target="_blank" class="menu-item">收藏的宝贝</a></li> <li><a href="###" target="_blank" class="menu-item">收藏的店铺</a></li> </ul> </li> <li class="fl"> <a href="###" target="_blank" class="nav-site-category link">商品分类</a> </li> <li class="menu dropdown fl" data-active="menu" data-load="js/dropdown-seller.json"> <a href="###" target="_blank" class="dropdown-toggle link transition">卖家中心<i class="dropdown-arrow icon transition"></i></a> <ul class="dropdown-layer dropdown-left"> <li class='dropdown-loading'></li> <!-- <li><a href="###" target="_blank" class="menu-item">免费开店</a></li> <li><a href="###" target="_blank" class="menu-item">已卖出的宝贝</a></li> <li><a href="###" target="_blank" class="menu-item">出售中的宝贝</a></li> <li><a href="###" target="_blank" class="menu-item">卖家服务市场</a></li> <li><a href="###" target="_blank" class="menu-item">卖家培训中心</a></li> <li><a href="###" target="_blank" class="menu-item">体验中心</a></li> --> </ul> </li> <li class="menu nav-site-service dropdown fl" data-active="menu"> <a href="###" target="_blank" class="dropdown-toggle link transition">联系客服<i class="dropdown-arrow icon transition"></i></a> <ul class="dropdown-layer dropdown-right"> <li><a href="###" target="_blank" class="menu-item">消费者客服</a></li> <li><a href="###" target="_blank" class="menu-item">卖家客服</a></li> </ul> </li> </ul> </div> </div> <!-- 站点导航结束 --> <!-- header区开始 --> <div class="header"> <div class="container"> <h1 class="fl"><a href="./index.html" class="header-logo text-hidden">慕课网</a></h1> <div class="search fl" id="header-search"> <form action="https://s.taobao.com/search" class="search-form"> <input type="text" name="q" class="search-inputbox fl" placeholder="灵魂美食一元抢" autocomplete="off" /> <input type="submit" value="搜索" class="search-btn fl"> </form> <ui class="search-layer"> <!-- <li class="search-layer-item text-ellipsis">111</li> <li class="search-layer-item text-ellipsis">111</li> <li class="search-layer-item text-ellipsis">111</li> --> </ui> </div> </div> </div> <!-- header区结束 --> <!-- 主导航开始 --> <div class="nav-main"> <div class="container"> <a href="##" target="_blacnk" class="link">数码城</a ><a href="##" target="_blacnk" class="link">天黑黑</a ><a href="##" target="_blacnk" class="link">团购</a ><a href="##" target="_blacnk" class="link">发现</a ><a href="##" target="_blacnk" class="link">二手特价</a ><a href="##" class="link">名品汇</a> </div> </div> <!-- 主导航结束 --> <!-- banner区开始 --> <div class="banner"> <div class="container cf"> <div class="category fl"> <a href="##" target="_blank" class="category-title"><i class="icon"></i>商品分类</a> <ui class="category-list"> <li class="dropdown" data-active="category" data-load="js/category-detail-1.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">家用电器</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-2.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">手机</a >、<a href="###" target="_blank" class="dropdown-link">运营商</a >、<a href="###" target="_blank" class="dropdown-link">数码</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-3.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">电脑</a >、<a href="###" target="_blank" class="dropdown-link">办公</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-4.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">家居</a >、<a href="###" target="_blank" class="dropdown-link">家具</a >、<a href="###" target="_blank" class="dropdown-link">家装</a >、<a href="###" target="_blank" class="dropdown-link">厨具</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-5.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">男装</a >、<a href="###" target="_blank" class="dropdown-link">女装</a >、<a href="###" target="_blank" class="dropdown-link">童装</a >、<a href="###" target="_blank" class="dropdown-link">内衣</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-6.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">化妆</a >、<a href="###" target="_blank" class="dropdown-link">清洁</a >、<a href="###" target="_blank" class="dropdown-link">宠物</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-7.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">运动户外</a >、<a href="###" target="_blank" class="dropdown-link">钟表</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-8.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">汽车</a >、<a href="###" target="_blank" class="dropdown-link">汽车用品</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-9.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">母婴</a >、<a href="###" target="_blank" class="dropdown-link">玩具乐器</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-10.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">食品</a >、<a href="###" target="_blank" class="dropdown-link">酒类</a >、<a href="###" target="_blank" class="dropdown-link">生鲜</a >、<a href="###" target="_blank" class="dropdown-link">特产</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-11.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">医药保健</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-12.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">图书</a >、<a href="###" target="_blank" class="dropdown-link">音像</a >、<a href="###" target="_blank" class="dropdown-link">电子书</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-13.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">彩票</a >、<a href="###" target="_blank" class="dropdown-link">旅行</a >、<a href="###" target="_blank" class="dropdown-link">充值</a >、<a href="###" target="_blank" class="dropdown-link">票务</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> <li class="dropdown" data-active="category" data-load="js/category-detail-14.json"> <div class="dropdown-toggle"> <a href="###" target="_blank" class="dropdown-link">理财</a >、<a href="###" target="_blank" class="dropdown-link">众筹</a >、<a href="###" target="_blank" class="dropdown-link">白条</a >、<a href="###" target="_blank" class="dropdown-link">保险</a> <i class="dropdown-arrow">></i> </div> <div class="dropdown-layer"> <div class="dropdown-loading"></div> </div> </li> </ui> </div> <div class="carousel fl"></div> <div class="banner-sidebar fr"></div> </div> </div> <!-- banner区结束 --> <script> window.jQuery || document.write("<script src='js/jQuery.js'><\/script>"); </script> <script src="js/transition.js"></script> <script src="js/showHide.js"></script> <script src="js/dropdown.js"></script> <script src="js/search.js"></script> <script src="js/index.js"></script> </body> </html>
/*常用公共样式*/ .fl { float: left; display: inline; } .fr { float: right; display: inline; } .cf:before, .cf:after { content: " "; display: table; } .cf:after { clear: both; } .cf { *zoom: 1; } /* 公共样式 */ .container{ width:1200px; margin:0 auto; } a.link{ color:#4d555d; } a.link:hover{ color:#f01414; } .transition{ transition:all 0.5s; -o-transition:all 0.5s; -ms-transition:all 0.5s; -moz-transition:all 0.5s; -webkit-transition:all 0.5s; } [class*="-active"] .dropdown-arrow{ transform:rotate(180deg); -o-transform:rotate(180deg); -ms-transform:rotate(180deg); -moz-transform:rotate(180deg); -webkit-transform:rotate(180deg); } .text-hidden{ text-indent:-999px; overflow: hidden; } .text-ellipsis{ text-overflow: ellipsis; white-space: nowrap; overflow: hidden; } /* icon */ @font-face { font-family: "iconfont"; src: url('../font/iconfont.eot?t=1556027603322'); /* IE9 */ src: url('../font/iconfont.eot?t=1556027603322#iefix') format('embedded-opentype'), /* IE6-IE8 */ /*url('../font/data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAuEAAsAAAAAFMgAAAs1AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCEaAqaCJU2ATYCJAM4Cx4ABCAFhG0HgTobjhGjopyQRpH9BbYNe5LJ5NyOIRASYzEKJkexAPc0BQCA4QYAwG0BAADgAyzgyqIFgue/uc/7hjOTZBEUoAJSfDxx0e6prWwtkZCV1YQKyFaYzRZ0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FfNIpiUJUnh6gjSBPmAcx4IsickgR2A+KDJKYj7RxMwFMRkwYoQIEuptCFKUvIXa5ngOGjjeC7K0eqdx8BwuQZHt4YGZGBgYo9CMIha0BVZ2wpiKwNVutoURdq9FNVYDYpaqxWGNqLkVI3A4NSnl3CxBcdTchZ7WNg3fYlHDajNhhEvEMajBQMAmM6FDVZYkLZpM2cnJ6o3eJBVhBAyWmaEQFhO2BUypMyFGhYBTb27ByPx8LZSGlQHCXDDuIWEjlFkrbOewVElSKgAJhVcadyp9W7XR4LPIPDWYhpoRjGAlMg9lcBoIMJN9Lx2UikUSbYM6k2zJcj51VSppeMb4rlO8fRNq46Uo0WLEihMvQbLf+afJpZBS6vAXEcyEIYSrAdOitBYMwTsxXMPqwBADomMsFsLK6dISuEblcVsTVYSpk9xJWDswtxxpaKhLi+BdVgOGp6RSdZi1aR7dgHXHpUe1VrLFjGA43QY1tTk0KEVrRdQoRqZyHQYAAAA=') format('woff2'),*/ url('../font/iconfont.woff?t=1556027603322') format('woff'), url('../font/iconfont.ttf?t=1556027603322') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ url('../font/iconfont.svg?t=1556027603322#iconfont') format('svg'); /* iOS 4.1- */ } .icon { font-family: "iconfont" !important; font-size: 14px; font-style: normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* showHide */ .fadeOut{ opacity:0; visibility: hidden; } .slideUpDownCollapse{ height:0 !important; padding-top:0 !important; padding-bottom:0 !important; } .slideLeftRightCollapse{ width:0 !important; padding-left:0 !important; padding-right:0 !important; } /* dropdown */ .dropdown{ position: relative; } .dropdown-toggle{ position: relative; z-index: 2; } .dropdown-arrow{ display: inline-block; line-height:1; vertical-align: middle; } .dropdown-layer{ display: none; position: absolute; z-index: 1; } .dropdown-left{ left:0; right:auto; } .dropdown-right{ left:auto; right:0; } [class*="-active"] .dropdown-arrow{ transform:rotate(180deg); -o-transform:rotate(180deg); -ms-transform:rotate(180deg); -moz-transform:rotate(180deg); -webkit-transform:rotate(180deg); } .dropdown-loading{ width:32px; height:32px; background:url(../img/loading.gif) no-repeat; margin:20px; } /* menu-dropdown */ .menu .dropdown-toggle{ display: block; height:100%; padding:0 13px 0 12px; border-left:1px solid #f3f5f7; border-right:1px solid #f3f5f7; } .menu .dropdown-arrow{ margin-left:5px; } .menu .dropdown-layer{ top:43px; background-color:#fff; border:1px solid #cdd0d4; } .menu-item{ display: block; height:30px; line-height: 30px; white-space:nowrap; padding:0 12px; color:#4d555d; } .menu-item:hover{ background-color: #f3f5f7; } .menu-active .dropdown-toggle{ background-color: #fff; border-color:#cdd0d4; } /* search */ .search{ position: relative; border:1px solid #cfd2d5; } .search-inputbox{ width:585px; height:40px; line-height: 40px; padding:0 10px; border:none; background-color:#fff; } .search-btn{ width:73px; height:40px; font-size:14px; color:#fff; background-color:#ca003f; border:none; line-height: 40px; text-align:center; cursor:pointer; } .search-layer{ display: none; position: absolute; top:100%; left:-1px; width:100%; background-color:#fff; border:1px solid #cfd2d5; } .search-layer-item{ height:24px; line-height: 24px; padding:0 10px; cursor: pointer; } .search-layer-item:hover{ background-color:#f3f5f7; } /* category */ .category{ width:208px; margin-top:-62px; font-size:14px; } .category-title{ display: block; height:54px; line-height: 54px; padding:0 20px; background-color:#c1043f; color:#fff; } .category-title .icon{ margin-right:10px; font-size:16px; } .category-list{ height:512px; background-color:#ca003f; } .category .dropdown-toggle{ height:36px; line-height: 36px; padding-left:16px; color:#fff; } .category .dropdown-link{ color:#fff; }
4
收起
正在回答 回答被采纳积分+1
3回答
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星