특정 크기 div에 맞는 이미지를 얻으려고합니다. 불행히도 이미지는이를 따르지 않고 대신 충분히 크지 않은 크기로 비례하여 축소됩니다. 이미지를 내부에 맞추는 가장 좋은 방법이 무엇인지 잘 모르겠습니다.
이 코드가 충분하지 않다면 더 많은 것을 제공 할 수 있고 내가 간과하고있는 다른 오류를 수정할 수 있습니다.
다음은 HTML입니다.
<div class="span3 top1">
<div class="row">
<div class="span3 food1">
<img src="images/food1.jpg" alt="">
</div>
</div>
<div class="row">
<div class="span3 name1">
heres the name
</div>
</div>
<div class="row">
<div class="span3 description1">
heres where i describe and say "read more"
</div>
</div>
</div>
내 CSS
.top1{
height:390px;
background-color:#FFFFFF;
margin-top:10px;
}
.food1{
background-color:#000000;
height:230px;
}
.name1{
background-color:#555555;
height:90px;
}
.description1{
background-color:#777777;
height:70px;
}