演示:http://jsfiddle.net/LTchE/10/3 Div時,一個集裝箱,響應
HTML:
<body>
<div class="wrapper">
<div class="x"></div>
<div class="y"></div>
<div class="z"></div>
</div>
</body>
CSS:
body, html {
height: 100%;
margin: 0px auto;
padding: 0px auto;
}
.wrapper {
height: auto;
min-height: 100%;
margin: 0px auto;
padding: 0px auto;
max-width: 100%;
background: #de291e;
}
.x {
background: url('http://placehold.it/300x505') no-repeat center;
background-size: contain;
max-width: 300px;
width:100%;
height: 505px;
display: block;
float:left;
}
.y {
background: url('http://placehold.it/500x505') no-repeat center;
background-size: contain;
max-width: 500px;
width:100%;
height: 505px;
display: block;
float:left;
}
.z {
background: url('http://placehold.it/100x505') no-repeat center;
background-size: contain;
max-width: 100px;
height: 505px;
width:100%;
display: block;
float:left;
}
我有這樣3個div的屏幕,但調整的窗口時,他們分成新的行...
我想然後繼續在同一行,就像是響應..
任何人都可以幫忙嗎?即時搜索這個小時現在.. :(
(也有可能它們總是匹配屏幕尺寸?)現在的最大值是900px ..但我不知道,也許如果某人有一個巨大的屏幕,以適應它)
你可以把你想要的最終結果的圖片? – Gislef