私はHTMLでこれを持っていると私は、容器内部の画像が中央に配置する必要があると私は親のdivのサイズを変更した場合でもスケールと中央の画像
<div class="art-cont" id="art">
<div class="art-1">
<img src="https://cdn.stocksnap.io/img-thumbs/960w/2SQMYBPQGK.jpg">
</div>
<div class="art-2">
<img src="https://cdn.stocksnap.io/img-thumbs/960w/2SQMYBPQGK.jpg">
</div>
<div class="art-3">
<img src="https://cdn.stocksnap.io/img-thumbs/960w/2SQMYBPQGK.jpg">
</div>
</div>
CSSスケールする:
を.art-cont{
width:100%;
height:400px;
}
.art-1{
width:70%;
height:50%;
float:left;
position:relative;
overflow:hidden;
border:2px solid #fff;
}
.art-2{
width:30%;
height:50%;
float:left;
position:relative;
overflow:hidden;
border:2px solid #fff;
}
.art-3{
width:100%;
height:50%;
clear:both;
position:relative;
overflow:hidden;
border:2px solid #fff;
}
はここでフィドルです:https://jsfiddle.net/0r7rhe77/