이미지 높이를 너비에 따라 자동으로 조정되는 가변 이미지기법


<style type="text/css">
.img-wrap{width:33.3%;background-color:red;}
.img-wrap .img-box{
position: relative;
width: 100%;
height: 0;
overflow: hidden;
padding-bottom: 56.26%;
}
.img-wrap .img-box .img-elm {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
<div class="img-wrap">
<div class="img-box">
<img class="img-elm" />
</div>
</div>