2
我需要圖片出現在多行中。問題是我必須在一個大循環中完成所有操作,並使用overflow:auto。無論如何對我來說這樣做? 下面是代碼:如何在一個循環中生成溢出的行
<div class="horizontal2">
<ul>
<li>
<?php for ($i=0; $i <60; $i++): ?>
{{ user:profile }}
<img class="picformatting" src="{{ profile_picture:image }}" />
{{ /user:profile }}
<?php endfor;?>
</li>
</ul>
</div>
這裏是CSS(horizontal2):
.horizontal2{
list-style: none;
width: 100%;
overflow: auto;
padding-left: 0;
}
你試過浮動圖像? – Jrod 2013-02-11 17:37:56
picformatting類的css是什麼?嘗試將圖像浮動到右側並進行顯示:內聯。 – Husman 2013-02-11 17:40:46