我通过浮动为图像自动高度构建卡,但是当图像高度较大时,其他一些则不能替换空间

问题描述 投票:0回答:1

我通过浮动为图像自动高度构建卡,但是当图像高度较大时,其他一些则不能替换空间

show error by image

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;
}
javascript html css wordpress css-float
1个回答
0
投票
        <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>
© www.soinside.com 2019 - 2024. All rights reserved.