我通过浮动为图像自动高度构建卡,但是当图像高度较大时,其他一些则不能替换空间
section{
display: inline-block;
background: #ffc10794;
margin: 37px;
text-align: center;
}
.articlePost{
background: #ffc10794;
float: left;
width: 333px;
height: auto;
box-shadow: -11px -11px 14px rgb(34, 166, 243) inset,-11px -11px 8px rgb(42, 6, 109) inset,
-17px -11px 14px rgb(33, 148, 22), 17px 17px 18px rgb(35, 51, 145);
margin: 11px;
}
.articlePost img{
float: left;
width: 95%;
height: auto;
margin: 8px;
border: 5px blue;
}
<section>
<article class="articlePost" id="post-35">
<a href="http://localhost/wordpress/2020/01/21/ "> <img src="http://localhost/wordpress/wp-content/uploads/2020/01/39.jpg" > </a>
</article>
</section>