【发布时间】:2013-10-26 04:05:26
【问题描述】:
例如,大多数@media 调用会说设计是 480 像素宽度,但他们将容器设置为 360 像素?他们是为什么没有考虑这么多房间的具体原因吗?示例 320 将容器宽度设置为 260 和 480 将容器宽度设置为下面的 360。
/* #Mobile (Portrait)
================================================ === */
/* Note: Design for a width of 320px */
@media only screen and (max-width: 767px) {
.container,
.container.floated { width: 260px; }
.container .columns,
.container .column { margin: 0; }
.container .floated { float: left; padding: 0 30px; }
.floated.sidebar { position: relative; }
.container .one.column,
.container .one.columns,
.container .one.floated,
.container .two.columns,
.container .two.floated,
.container .three.columns,
.container .three.floated,
.container .four.columns,
.container .four.floated,
.container .five.columns,
.container .five.floated,
.container .six.columns,
.container .six.floated,
.container .seven.columns,
.container .seven.floated,
.container .eight.columns,
.container .eight.floated,
.container .nine.columns,
.container .nine.floated,
.container .ten.columns,
.container .ten.floated,
.container .eleven.columns,
.container .eleven.floated,
.container .twelve.columns,
.container .twelve.floated,
.container .thirteen.columns,
.container .thirteen.floated,
.container .fourteen.columns,
.container .fourteen.floated,
.container .fifteen.columns,
.container .fifteen.floated,
.container .sixteen.columns,
.container .sixteen.floated,
.container .one-third.column,
.container .two-thirds.column { width: 260px; }
/* Offsets */
.container .offset-by-one,
.container .offset-by-two,
.container .offset-by-three,
.container .offset-by-four,
.container .offset-by-five,
.container .offset-by-six,
.container .offset-by-seven,
.container .offset-by-eight,
.container .offset-by-nine,
.container .offset-by-ten,
.container .offset-by-eleven,
.container .offset-by-twelve,
.container .offset-by-thirteen,
.container .offset-by-fourteen,
.container .offset-by-fifteen { padding-left: 0; }
/* Pricing Tables */
.five-tables .pricing-table,
.four-tables .pricing-table,
.three-tables .pricing-table,
.two-tables .pricing-table { width: 260px; }
}
/* #Mobile(横向) ================================================== */
/* Note: Design for a width of 480px */
@media only screen and (min-width: 480px) and (max-width: 767px) {
.container { width: 360px; }
.container .columns,
.container .column { margin: 0; }
.container .floated { float: left; padding: 0 30px; }
.floated.sidebar { position: relative; }
.container .one.column,
.container .one.columns,
.container .one.floated,
.container .two.columns,
.container .two.floated,
.container .three.columns,
.container .three.floated,
.container .four.columns,
.container .four.floated,
.container .five.columns,
.container .five.floated,
.container .six.columns,
.container .six.floated,
.container .seven.columns,
.container .seven.floated,
.container .eight.columns,
.container .eight.floated,
.container .nine.columns,
.container .nine.floated,
.container .ten.columns,
.container .ten.floated,
.container .eleven.columns,
.container .eleven.floated,
.container .twelve.columns,
.container .twelve.floated,
.container .thirteen.columns,
.container .thirteen.floated,
.container .fourteen.columns,
.container .fourteen.floated,
.container .fifteen.columns,
.container .fifteen.floated,
.container .sixteen.columns,
.container .sixteen.floated,
.container .one-third.column,
.container .two-thirds.column { width: 360px; }
/* Pricing Tables */
.five-tables .pricing-table,
.four-tables .pricing-table,
.three-tables .pricing-table,
.two-tables .pricing-table { width: 360px; }
}
我只是想知道在我去重新调整所有东西之前我是否遗漏了一些非常重要的东西。我在我一直使用的几乎所有标准设置中都看到了它,我感觉就像你一样不需要考虑那么多的宽度..
【问题讨论】:
-
这些样式看起来像是某种固定宽度的网格系统的一部分。如果你想要一些流动的东西,你应该简单地检查一些其他的网格系统:)
标签: css mobile media-queries