我有这个问题,我已经在bootstrap中制作了一张卡片,但我的文字不在图片之外。
我需要它看起来像这样(第一个例子)
这就是我一直在尝试的
<div class="col-sm-4 text-center padding wow fadeIn" data-wow-duration="1000ms" data-wow-delay="900ms" style="background-color:aliceblue;">
<div class="card">
<img class="card-img-top" src="http://placehold.it/250x250" alt="Card image cap">
<div class="card-block">
<h2>Min profil</h2>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Min profil</a>
</div>
</div>
</div>
答案 0 :(得分:1)
自适应图片
通过添加MAX_NAME_LEN
创建响应式图像然后,图像将很好地缩放到父元素。
.img-responsive class to the <img> tag.
和img-responsive class applies max-width: 100%, height: auto,
到图片:
display:block