【发布时间】:2016-04-28 13:22:43
【问题描述】:
演示:http://jsfiddle.net/LTchE/10/
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.. 但我不知道,也许如果有人有一个巨大的屏幕,以适应它)
【问题讨论】:
-
你可以放一张你想要的最终结果的图片吗?