答案 0 :(得分:1)
根据比例给每个width
。
img {
padding: 1%;
width: 64.3%;
}
img + img {
width: 31.5%
}
<img src="http://lorempixel.com/940/400" /><img src="http://lorempixel.com/460/400" />
答案 1 :(得分:1)
https://jsfiddle.net/2028L68u/1/
CSS -
img{
display:inline-block;
}
#img1{
width:67%;
float:left;
}
#img2{
width:33%;
float:left;
}
HTML -
<img id="img1" src="http://www.sixdegreesdigitalmedia.com/wp-content/uploads/2016/06/Google-Tools-part-two-940x400.jpg" />
<img id=img2 src="http://kitengelaterraces.com/wp-content/uploads/2015/09/Slider-460x400.jpg"/>