老师,还是会显示下边框
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>慕淘网</title>
<link rel="stylesheet" type="text/css" href="css/base.css">
<link rel="stylesheet" type="text/css" href="css/index.css">
<link rel="stylesheet" type="text/css" href="css/common.css">
</head>
<body>
<div class="nav-site">
<div class="container">
<ul class="fl">
<li class="fl"><a href="javascript:;" class="nav-site-login">亲,请登录</a></li>
<li class="fl"><a href="javascript:;" class="nav-site-signup link">免费注册</a></li>
<li class="fl"><a href="###" targat="_blank" class="nav-site-mobile link">手机逛慕淘</a></li>
</ul>
<ul class="fr">
<li class="dropdown fl">
<a href="###" target="_blank" class="dropdown-toggle link">我的慕淘<i class="dropdown-arrow"></i></a>
<ul class="dropdown-layer dropdown-left">
<li><a href="###" target="_blank" class="dropdown-item">已买到的宝贝</a></li>
<li><a href="###" target="_blank" class="dropdown-item">我的足迹</a></li>
</ul>
</li>
<li class="dropdown fl">
<a href="###" target="_blank" class="dropdown-toggle link">收藏夹<i class="dropdown-arrow"></i></a>
<ul class="dropdown-layer dropdown-left">
<li><a href="###" target="_blank" class="dropdown-item">收藏的宝贝</a></li>
<li><a href="###" target="_blank" class="dropdown-item">收藏的店铺</a></li>
</ul>
</li>
<li class="fl">
<a href="###" target="_blank" class="nav-site-category link">商品分类</a>
</li>
<li class="dropdown fl">
<a href="###" target="_blank" class="dropdown-toggle link">卖家中心<i class="dropdown-arrow"></i></a>
<ul class="dropdown-layer dropdown-left">
<li><a href="###" target="_blank" class="dropdown-item">免费开店</a></li>
<li><a href="###" target="_blank" class="dropdown-item">已卖出的宝贝</a></li>
<li><a href="###" target="_blank" class="dropdown-item">出售中的宝贝</a></li>
<li><a href="###" target="_blank" class="dropdown-item">卖家服务市场</a></li>
<li><a href="###" target="_blank" class="dropdown-item">卖家培训中心</a></li>
<li><a href="###" target="_blank" class="dropdown-item">体验中心</a></li>
</ul>
</li>
<li class="nav-site-service dropdown fl">
<a href="###" target="_blank" class="dropdown-toggle link">联系客服<i class="dropdown-arrow"></i></a>
<ul class="dropdown-layer dropdown-right">
<li><a href="###" target="_blank" class="dropdown-item">消费者客服</a></li>
<li><a href="###" target="_blank" class="dropdown-item">卖家客服</a></li>
</ul>
</li>
</ul>
</div>
</div>
<!-- <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> CDN-->
<script>
window.jQuery || document.write('<script src="js/jquery.js"><\/script>');
</script>
<script src="js/index.js"></script>
</body>
</html>
/* nav-site */
.nav-site{
width: 100%;
background-color: #f5f3f7;
}
.nav-site .container{
height: 44px;
line-height: 44px;
border-bottom: 1px solid #cdd0d4;
}
.nav-site-login{
margin-left: 15px;
color: #f01414;
margin-right: 10px;
}
.nav-site-signup{
margin-right: 10px;
}
.nav-site-mobile{
margin-right: 15px;
}
.dropdown{
position: relative;
/* display: inline; */
}
.dropdown-toggle{
position: relative;
z-index: 2;
display:block;
height: 100%;
padding: 0 16px 0 12px;
border-left: 1px solid #f3f5f7;
border-right: 1px solid #f3f5f7;
}
.dropdown-arrow{
display: inline-block;
width: 8px;
height: 6px;
background: url('../img/dropdown-arrow.png') no-repeat;
margin-left: 8px;
vertical-align: middle;
}
.nav-site-category{
margin: 0 10px;
}
.nav-site-service{
margin-right: 15px;
}
.dropdown-layer{
display: none;
position: absolute;
z-index: 1;
top: 43px;
background-color: #fff;
border: 1px solid #cdd0d4;
}
.dropdown-left{
left: 0;
right: auto;
}
.dropdown-right{
right: 0;
left: auto;
}
.dropdown-item{
display: block;
height: 30px;
line-height: 30px;
padding: 0 12px;
color: #4d555d;
white-space: nowrap; /* 不换行 */
}
.dropdown-item:hover{
background-color: #f3f5f7;
}
.dropdown-active .dropdown-toggle{
background-color: #fff;
border-color: #cdd0d4;
}
.dropdown-active .dropdown-arrow{
background: url('../img/dropdown-arrow-active.png');
}
.dropdown-active .dropdown-layer{
display: block;
}
/*公共样式*/
.container { /*站点导航*/
width: 1200px;
margin: 0 auto;
}
a.link { /*链接正常颜色*/
color: #4d555d;
}
a.link:hover { /*链接经过颜色*/
color: #f01414 !important;
}
/*css reset*/
/*清除内外边距*/
body, h1, h2, h3, h4, h5, h6, p, hr, /*结构元素*/
ul, ol, li, dl, dt, dd, /*列表元素*/
form, fieldset, legend, input, button, select, textarea, /*表单元素*/
th, td, /*表格元素*/
pre {
padding: 0;
margin: 0;
}
/*重置默认样式*/
body, button, input, select, textarea {
/*font: 12px/1 微软雅黑, Tahoma, Helvetica, Arial, 宋体, sans-serif;*/
color: #333;
font: 12px/1 "Microsoft YaHei", Tahoma, Helvetica, Arial, SimSun, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
font-size: 100%;
font-weight: normal;
}
em, i {
font-style: normal;
}
a {
text-decoration: none;
}
li {
list-style-type: none;
vertical-align: top;
}
img {
border: none;
/*display: block;*/
vertical-align: top;
}
textarea {
overflow: auto;
resize: none;
}
table {
border-spacing: 0;
border-collapse: collapse;
}
/*常用公共样式*/
.fl {
float: left;
display: inline;
}
.fr {
float: right;
display: inline;
}
.cf::before,
.cf::after {
content: " ";
display: table;
}
.cf::after {
clear: both;
}
.cf {
*zoom: 1;
}
// $('.dropdown').hover(function () {
// var $dropdown=$(this);
// $dropdown.find('.dropdown-toggle').css({'background-color':'#fff','border-color':'#cdd0d4'});
// $dropdown.find('.dropdown-arrow').css({'background-image':'url(img/dropdown-arrow-active.png)'});
// $dropdown.find('.dropdown-layer').show();
// },function(){
// var $dropdown=$(this);
// $dropdown.find('.dropdown-toggle').css({'background-color':'','border-color':'#f3f5f7'});
// $dropdown.find('.dropdown-arrow').css({'background-image':'url(img/dropdown-arrow.png)'});
// $dropdown.find('.dropdown-layer').hide();
// });
$('.dropdown').hover(function () {
$(this).addClass('dropdown-active');
},function(){
$(this).removeClass('dropdown-active');
});
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星