我有一个页面,包含三个部分。每个部分都是一个占据页面整个 View 的部分。我希望文章和背景适合移动设备屏幕,就像在桌面上一样,但不知道如何调整文章。这是一个 fiddle :http://jsfiddle.net/kRjUn/
这是 CSS:
html {
height: 100%;
}
body {
font-size: 1em;
line-height: 1.4;
height: 100%;
}
article {
height: 100%;
padding-top: 2em;
}
.wrapper {
display: block;
margin-left: auto;
margin-right: auto;
width: 70%;
height: inherit;
}
.content {
margin-top: 25em;
height: inherit;
}
最佳答案
我找到了这个无网格样板,并将 body 高度设置为 100%,看起来效果很好。我也只是使用了一个 div 而不是文章。任何寻找干净且响应迅速的样板的人我都会定义。试一试:https://github.com/thatcoolguy/gridless-boilerplate
关于css - 响应式设计和文章元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13727102/