【问题标题】:Media Query for Samsung Galaxy Tab 4 - 7 inch三星 Galaxy Tab 4 - 7 英寸的媒体查询
【发布时间】:2014-10-12 01:48:24
【问题描述】:

我的应用程序针对各种 Android 平板电脑设备。主要是10寸和7寸三星和Nexus。

为了定位三星 Galaxy Tab 7 英寸,使用了以下媒体查询,1024x600 像素。它在 Galaxy tab 2, 3 of 7inch 中运行良好。但不适用于 Galaxy Tab 4 7 英寸。

@media only screen and (max-width: 1024px) and (orientation : landscape)
{ }

三星 Galaxy Tab 4.0 7 英寸使用以下屏幕规格。这与三星 Galaxy 4.0 10.1 英寸型号 - SM-T530NYKAXAR 相同。所以在我的 7 英寸 Galaxy Tab 4 上,它使用了三星 Galaxy Tab 4.0 10 英寸的媒体查询并加载了奇怪的 HTML 页面。

如何通过媒体查询定位三星 Galaxy Tab 4.0 7 英寸。

屏幕规格:

物理尺寸:7英寸

分辨率:1280x800(横向)

像素密度:216 ppi

谢谢。

【问题讨论】:

    标签: css media-queries hybrid-mobile-app


    【解决方案1】:

    我已经创建了这个并在设备上对其进行了测试,它似乎具有很强的针对性并且有效。

    @media only screen 
    and (min-device-width: 800px) 
    and (max-device-height: 1280px) 
    and (min-resolution: 192dpi)
    and (-webkit-device-pixel-ratio:2)
    and (orientation : portrait) 
    
    {
      .galaxy {background-color:red;}
      .onlygalaxyportrait {display:block !important; background-color:green;}
    
    
    
    }
    
    @media only screen 
    and (min-device-width: 1280px) 
    and (max-device-height: 800px) 
    and (min-resolution: 192dpi)
    and (-webkit-device-pixel-ratio:2)
    and (orientation : landscape) 
    
    {
      .galaxy {background-color:yellow;}
      .onlygalaxyland {display:block !important; background-color:orange;}
    
    
    
    
    
    
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-02-14
      • 2013-10-17
      • 2013-02-15
      • 2015-08-03
      • 2013-01-27
      • 1970-01-01
      • 2011-06-02
      • 2016-12-31
      相关资源
      最近更新 更多