【发布时间】:2015-02-01 16:51:12
【问题描述】:
我正在尝试使用移动优先的响应式设计方法。
这样做时,我希望将我的 MAX 媒体查询转换为 MIN 媒体查询。
因此,我的目标不是使用优雅降级,而是实现渐进增强
谁能解释重新设计我的 CSS 以使用 MIN-width 媒体查询而不是 MAX-width 的最佳方法?
在下面的示例中,我修剪了 95% 的 css 并留下了断点
//------------------主CSS
html {
box-sizing: border-box; /* apply borderbox to * */
}
*, *:before, *:after {
box-sizing: inherit;
}}
//--------------------------------媒体
@media screen and (max-width: 740px) {
#body {
display:none!important;
} }
//--------------------------------媒体
@media screen and (max-width: 600px) {
#header {
height: 17.3em;
} }
【问题讨论】:
标签: html css media-queries