css - 响应式设计和文章元素

标签 css html responsive-design

我有一个页面,包含三个部分。每个部分都是一个占据页面整个 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/

相关文章:

CSS - 将 Div 宽度设置为 100% 并调整大小以保持纵横比

css - react + typescript : TypeScript error: Type 'string' has no properties in common with type 'CSSProperties'

css - flexbox 没有在 React 中包装内容

html - 谷歌字体 URL 破坏 w3.org 上的 HTML5 验证

html - CSS 和定位 : img "title=this thing here" attribute

java - 如何使用 Java 在 MySQL DB 中插入 HTML?

html - 神秘的 CSS 垂直空间

html - 是否有 CSS 样式来选择具有任何 id 的元素?

html - 响应式网站应该满足多少种不同的分辨率/方向?

html - 在移动其他 DIV 的位置之前将 DIV 的大小调整为最小值