【问题标题】:Landscape and desktop view to make different in media query横向和桌面视图在媒体查询中有所不同
【发布时间】:2014-10-10 16:21:15
【问题描述】:

当桌面分辨率与横向相同时,我想让 7 英寸 ipad 中的横向视图与桌面视图不同。我正在为 lanscape 使用以下内容,但是当桌面与 lanscape 的宽度匹配时,不希望在桌面上出现这种样式:

 @media only screen and (min-device-width : 768px) and (max-device-width : 1024px)  and (max-device-height : 768px) 
and (orientation : landscape) {
/*style goes here*/
}

请帮忙,因为我需要解决这个问题。

【问题讨论】:

    标签: css media-queries


    【解决方案1】:

    你可以使用 head.jshttp://headjs.com/

    它为页面的头部元素设置了一堆有用的 css 类。

    <html class="js no-mobile desktop no-ie root-section w-1318 gt-240 
    gt-320 gt-480 gt-640 gt-768 gt-800 gt-1024 gt-1280 lt-1440 lt-1680 
    lt-1920 no-portrait landscape gradient rgba opacity textshadow 
    multiplebgs boxshadow borderimage borderradius cssreflections 
    csstransforms csstransitions no-touch no-retina fontface domloaded">
    

    您需要的 CSS 类是:

    • 桌面/非桌面
    • 移动/非移动

    甚至尺寸(它们在调整大小时刷新):

    • gt-768 / lt-768
    • gt-1024 / lt-1024

    【讨论】:

      猜你喜欢
      • 2018-02-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-30
      • 1970-01-01
      • 2021-12-24
      • 1970-01-01
      • 2011-12-30
      相关资源
      最近更新 更多