1 回答
TA贡献1982条经验 获得超2个赞
您对所有图像使用while from <div id="categories">,您将创建一个带有类别的div,您只需更改代码以<li>在while中创建一个,例如:
<div id="categories">
<div class="category-post-container clear">
<div class="categories-post-grid">
<div class="category" id="category-nature">
<div class="category-post-container root-category clear">
<ul>
<?php while($image = $images->fetch_assoc()){ ?>
<li class="" style="background-image: url('uploads/<?php echo $image['image'] ?>')">
<div class="post-meta">
<a class="square-link-cover" href="https://cee.exposure.co/rome"></a>
<div class="post-titles">
<h2 class="sip">
<a href="https://cee.exposure.co/rome">
<?php echo $image['title'] ?>
</a>
</h2>
</div>
</div>
</li>
<?php }?>
</ul>
</div>
</div>
</div>
</div>
</div>
- 1 回答
- 0 关注
- 95 浏览
添加回答
举报