老师请问如何去掉这个缝隙?内外边距都试过了都不行,请指导
<!--主体内容下部-->
<div class="gallary">
<div class="title">GALLAY</div>
<div class="link"></div>
<div class="word">
<p>Lorem Ipsum is simply dummy text df the printing and typesetting</p>
<p>industry.Lorem Ipsum has been the industry's standard dummy</p>
<p>text ever since the 1500s.</p>
</div>
<div class="gallary-top">
<div class="pic-1">
<img src="images/03-01.jpg">
<div class="des">SCIENCE LAB</div>
</div>
<div class="pic-2">
<img src="images/03-02.jpg">
<div class="des">INDOOR STADIUM</div>
</div>
<div class="pic-3">
<img src="images/03-03.jpg">
<div class="des">TRANAPORTATION</div>
</div>
</div>
<div class="gallary-bottom"></div>
<div class="pic-4">
<img src="images/03-04.jpg">
<div class="des">KIDS ROOM</div>
</div>
<div class="pic-5">
<img src="images/03-05.jpg">
<div class="des">MEDITATION CLASSES</div>
</div>
<div class="pic-6">
<img src="images/03-06.jpg">
<div class="des">KIDS PLAY GROUND</div>
</div>
</div>
.gallary .title{font-size: 30px;
font-weight: bold;
text-align: center;
}
.gallary .link{border:solid 1px #07cbc9;
width: 40px;
margin:20px auto;
}
.gallary{height:950px;
width:1200px;
margin:0 auto;}
.gallary .word{width: 550px;
text-align: center;
margin: 20px auto;
color:#696969;
line-height:30px;}
.gallary .img{width: 360px;
height:240px;
margin-bottom:-10px;}
.gallary .des{width: 360px;
height: 64px;
background-color: #000;
color: #fff;
text-align: center;
line-height: 64px;
}
.pic-1,.pic-2,.pic-3,.pic-4,.pic-5,.pic-6
{height:304px;
margin:20px 20px;
float: left;}
正在回答
默认的垂直对齐方式vertical-align默认值是baseline(基线对齐),也是以x字母的下方为基准
修改img行内元素的字体大小,基线的下方间隙是部分字体超过基线下方而产生的,如果把父元素的font-size变的超小,基线的下方距离将忽略不计。
希望可以帮到你!
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星