自举卡中的文字正在框外

时间:2016-04-21 06:50:17

标签: asp.net-mvc twitter-bootstrap

我有这个问题,我已经在bootstrap中制作了一张卡片,但我的文字不在图片之外。

image

我需要它看起来像这样(第一个例子)

image

这就是我一直在尝试的

<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>

1 个答案:

答案 0 :(得分:1)

自适应图片

通过添加MAX_NAME_LEN创建响应式图像然后,图像将很好地缩放到父元素。

.img-responsive class to the <img> tag.

img-responsive class applies max-width: 100%, height: auto,到图片:

display:block
相关问题