语法结构及用法: @media 设备名 only (选取条件) not (选取条件) and(设备选取条件),设备二{sRules} 实际应用一 判断设备横竖屏: /* 这是匹配横屏的状态,横屏时的css代码 */ @media all and (orientation :landscape){} /* 这是匹配竖屏的状态,竖屏时的css代码 */ @media all and (orientation :portrait){} 实际应用二 判断设备类型: @media X and (mi…
/* ----------- iPhone 4 and 4S ----------- */ /* Portrait and Landscape */ @media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) { } /* Portrait */ @media only screen and (min-device-wi…
iPhone的CSS3媒体查询: 各版本的iPhone媒体查询是根据其分辨率和一些CSS3媒体查询的特性来实现媒体查询的...详见下: iPhone6的媒体查询: @media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation : portrait) { /*iPhone 6 Portrait*/ } @media only screen and (min-device…
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation : portrait) { /*iPhone 6 Portrait*/ } @media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation : landscape) { /*iPh…
------------------- 1.媒体查询方法在 css 里面这样写 -------------------- @media screen and (min-width: 320px) and (max-width: 480px){在这里写小屏幕设备的样式} @media only screen and (min-width: 321px) and (max-width: 1024px){这里写宽度大于321px小于1024px的样式(一般是平板电脑)} @media only scr…