我无法使图像成为div的一半并且响应
<div class="col-sm-4">
<div class="service-box">
<img class="service-box-img img-responsive" src="something">
<h2>Header</h2>
sdfsdfdfdsfsdfdsfdf
</div>
</div>
css:
.col-sm-4{
padding-left:100px;
padding-right:100px;
height:300px;
}
.service-box{
background-color:white;
padding:30px;
padding-left:100px;
}
.service-box-img{
height:150px;
}
答案 0 :(得分:2)
尝试添加
.col-sm-4 img {
width: 100%
}