【发布时间】:2021-11-05 08:27:36
【问题描述】:
我是新手,不懂 CSS。我在我的 Django 网站上使用了一个模板。 当我直接在 html 页面上添加图片链接时,它们会自动调整到图片网格中。 但是,当我添加代码并从网站上传图片时,它们都以不同的尺寸显示。 我希望它们都保持一致并适合预定的盒子大小。
<div class="container-fixed">
<div class="adoption1">
<h1 class="wow fadeIn animated">Meet our Penguins</h1>
<div class="grid-cats wow">
{% for post in posts %}
<div class="col-md-4 thumbs">
<a href="">
<figure class="effect-marley">
<img src="{{ post.image2.url }}" alt=""/>
<figcaption>
<h2>SUPER<span>CUTE</span></h2>
<p>{{ post.content }}</p>
</figcaption>
</figure>
</a>
</div>
{% endfor %}
【问题讨论】:
标签: html css django templates image-scaling