我的图像溢出了我的行。我在网上看到clearfix可以防止这种情况发生。但是应用了这个,我的图像显得非常细,几乎没有任何可见的东西。我的代码在下面可见。如何确保我的图像在此容器中动态调整大小?
<div class="row">
<div class="col-sm-2 col-md-2 col-lg-2">
<img src="url" alt="A picture" id="heading-img" class="img-responsive">
</div>
<div class="col-sm-6 col-md-6 col-lg-6 col-sm-offset-2 col-md-offset-2 col-lg-offset-2">other things</div>
</div>
答案 0 :(得分:0)
添加class =&#34; img-responsive&#34;如果你正在使用bootstrap css。