学习地址-http://zh.learnlayout.com
- 使用
max-width来代替width - 设置盒模型
box-sizing: border-box - 关于固定定位
position:fixed- 使用
<header><footer>后要确保有足够空间来显示body内容,给body设置margin-top与margin-bottom - 待续...
- 使用
- 百分比宽度可以用来为图片设置宽高,这样就可以根据其父元素宽高变化而变化,父元素宽度用
max-width - 更好的实现响应式布局可以用媒体查询
@media screen and (min-width:600px) {} - 实现文字的多列布局 下面是3列布局
.three-column {
padding: 1em;
-moz-column-count: 3;
-moz-column-gap: 1em;
-webkit-column-count: 3;
-webkit-column-gap: 1em;
column-count: 3;
column-gap: 1em;
}
- 移动端input placeholder 偏上问题
line-height:normal