必须在头文件引入的代码:
1 2 3 4 5 6 7 |
meta http-equiv="Content-Type" content="text/html; charset=utf-8" meta name="viewport" content="width=device-width, initial-scale=1" link href="pure-release-0.6.1/pure-min.css" rel="stylesheet" link href="pure-release-0.6.1/grids-responsive-min.css" rel="stylesheet" |
必备的pure文件pure-min.css grids-responsive-min.css
示例
直接用css3做响应式布局:
1 2 3 4 5 |
@media screen and (min-width:900px)(表示最小宽度在>=900时) @media screen and (min-width:600px) and (max-width:900px)(表示最小宽度在600-900px时) @media screen and (max-width:600px)最小宽度小于600时 |