gpt4 book ai didi

jQuery Masonry Mobile 2 列布局修复

转载 作者:行者123 更新时间:2023-11-28 12:30:44 26 4
gpt4 key购买 nike

我试图让此页面的“移动”布局显示 2 列布局,但 Masonry 或 CSS 将其强制为 1 列。

演示:http://jsfiddle.net/EcuU7/

这就是我想要完成的: enter image description here

html`

            <li class="item w3 stamp stamp-here">
<img src="http://placekitten.com/746/428" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/300" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/150" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/400" alt="">
</li>

<li class="item w2">
<img src="http://placekitten.com/495/400" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/320" alt="">
</li>

<li class="item w2">
<img src="http://placekitten.com/495/495" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/234" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/300" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/234" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/300" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/150" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/400" alt="">
</li>

<li class="item w2">
<img src="http://placekitten.com/495/400" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/320" alt="">
</li>

<li class="item w2">
<img src="http://placekitten.com/495/495" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/234" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/300" alt="">
</li>

<li class="item">
<img src="http://placekitten.com/245/234" alt="">
</li>


</ul>

最佳答案

兄弟,试试这个:http://jsfiddle.net/EcuU7/1/

我加了

img{
最大宽度:90%;

max-width:250px; for grid li

关于jQuery Masonry Mobile 2 列布局修复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18258091/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com