2014-10-10 55 views
-1

我想在桌面分辨率与横向相同时使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*/ 
} 

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

回答

0

你可以使用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
相关问题