猿问

为什么导航栏与上一栏有间隙?


<div class="navBox">

<div class="comWidth">

<div class="shopclass">

<h3>全部商品分类<i></i></h3>

<div class="shopclass_show">

<dl class=shopClass_item>

<dt><a href="#">手机</a><a href="#">数码</a>

<a href="#">合约机</a>

</dt>

<dd><a href="#">荣耀三X</a><a href="#">单反</a>

<a href="#">智能设备</a>

</dd>

</dl>

</div>

</div>

<ul class="nav ">

<li><a href="#">数码城</a></li>

<li><a href="#">天黑黑</a></li>

<li><a href="#">团购</a></li>

<li><a href="#">发现</a></li>

<li><a href="#">二手特卖</a></li>

<li><a href="#">名品会</a></li>

</ul>

</div>

</div><!--navBox结束-->




.sear_bar{

width: 430px;

padding-top:23px ;

padding-left:185px ;

}

.search_text{width:350px ;height:35px;padding:0 5px ;line-height:35px\9;background-color: white;}

.search_btn{width: 70px;height: 35px;font-size: 14px;font-family: "微软雅黑";background-color: #ff8c00;color: #FFF;}

/*shopcar*/

.shopcar{

height:35px;width: 145px;margin-top:23px ;background-color: #ff8c00;font-size: 14px;font-family: "微软雅黑";margin-right: 59;

color:#FFF ;line-height:35px ;}

.shopText{

height: 100%;width:87px;border-right:#E27A00 solid 1px ;

background:url(../img/icon/55555_03.jpg) 10px center no-repeat ;text-indent: 40px;

}

.shopNum{

width: 27px;height: 35px;

background: url(../img/icon/666_07.jpg) 33px center no-repeat;

border-left:#FF9C01 solid 1px ;text-align: right;padding-right:29px ;

}

/*navBox*/

.navBox{

height: 35px;background-color: #1d7ad9;

}




/*CSS Document*/

body,ul,ol,dl,dd,,dt,h1,h2,h3,h4,h5,h6,p,fieldset,form,li,p,table,td,img,div{margin: 0; padding: 0;}

body{font-size:12px;}

img{border:none;}

li{list-style:none;}

input,select,textarea{outline:none;border:none;background: none ;}

textarea{resize:none;}

a{text-decoration:none;color: #656565;}

/*清浮动*/

.clearfix:after{content:"";display:block;clear:both;}

.clearfix{zoom:1;}

.fl{

float: left;

}

.fr{

float: right;

}



慕粉3363148
浏览 1763回答 1
1回答

一朵梨花压海棠的小虫周伯通

<dl></dl>标签有默认的margin属性,你将这个这个标签的margin设置为0就不会有间隙了.
随时随地看视频慕课网APP

相关分类

CSS3
Html5
我要回答