【问题标题】:getting min-width and min device width to work at the same time让最小宽度和最小设备宽度同时工作
【发布时间】:2013-05-31 00:41:05
【问题描述】:

这适用于我的 iPhone

@media only screen 
and (min-device-width : 320px) 
and (max-device-width : 480px) {

这适用于 chrome

@media only screen 
and (min-width : 320px) 
and (max-width : 480px) {

我可以让他们在同一组规则下工作吗?

【问题讨论】:

    标签: responsive-design width media-queries


    【解决方案1】:

    除非您需要特定的小型设备样式,否则请在查询中仅使用 max-width 和 min-width。确保您在<head> 中使用<meta> 标记,以使这些查询应用于小屏幕设备。 <meta name="viewport" content="width=device-width,initial-scale=1.0">

    【讨论】:

      猜你喜欢
      • 2017-03-12
      • 1970-01-01
      • 2012-11-13
      • 2012-05-08
      • 1970-01-01
      • 2012-03-17
      • 2013-05-14
      • 2011-10-18
      • 1970-01-01
      相关资源
      最近更新 更多