我是网络开发新手,我正在尝试制作一个网站,用于用 CSS、HTML5 对我的图片进行排序。我希望排序看起来像文本将图像分开,就像一个新段落一样。我尝试添加看起来怎么样
<br />
但这并没有像我预期的那样起作用。感谢我能得到的任何帮助:)
#pics {
margin-top: 10px;
max-width: 1500px;
margin-left: auto;
margin-right: auto;
}
.pics-text {
font-family: 'Roboto', sans-serif;
font-size: 36px;
color: #ffffff;
opacity: 87%;
}
.pic-item {
float: left;
position: relative;
width: 20%;
padding-top: 5px;
padding-right: 7px;
}
.pic-item a img {
width: 100%;
border-radius: 5px;
}
<div id="pics">
<h2 class="pics-text">some text</h2>
<div class="pic-item">
<a href="#"><img src="./imgs/123-vertical/1.jpg" /></a>
</div>
<div class="pic-item">
<a href="#"><img src="./imgs/123-vertical/2.jpg" /></a>
</div>
<div class="pic-item">
<a href="#"><img src="./imgs/123-vertical/3.jpg" /></a>
</div>
</div>
<div id="pics">
<h2 class="pics-text">some text</h2>
<div class="pic-item">
<a href="#"><img src="./imgs/123-vertical/1.jpg" /></a>
</div>
<div class="pic-item">
<a href="#"><img src="./imgs/123-vertical/2.jpg" /></a>
</div>
<div class="pic-item">
<a href="#"><img src="./imgs/123-vertical/3.jpg" /></a>
</div>
</div>
慕工程0101907
凤凰求蛊
相关分类