适配各种移动设备的mediaquery
2015-06-08 11:05
411 查看
/* Desktops and laptops ----------- */ @media only screen and (min-width : 1224px) { /* Styles */ } /* Large screens ----------- */ @media only screen and (min-width : 1824px) { /* Styles */ } /* old Smartphones (portrait and landscape) ----------- */ @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { /* Styles */ } /* old Smartphones (landscape) ----------- */ @media only screen and (min-width : 321px) { /* Styles */ } /* old Smartphones (portrait) ----------- */ @media only screen and (max-width : 320px) { /* Styles */ } /* iPhone 4 ----------- */ @media only screen and (-webkit-min-device-pixel-ratio : 1.5), only screen and (min-device-pixel-ratio : 1.5) { /* Styles */ } /* iPads (portrait and landscape) ----------- */ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) { /* Styles */ } /* iPads (landscape) ----------- */ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) { /* Styles */ } /* iPads (portrait) ----------- */ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) { /* Styles */ } /* Android Tablet (portrait and landscape) ----------- */ @media only screen and (min-device-width : 800px) and (max-device-width : 1280px) { /* Styles */ } /* Android Tablet (landscape) ----------- */ @media only screen and (min-device-width : 800px) and (max-device-width : 1280px) and (orientation : landscape) { /* Styles */ } /* Android Tablet (portrait) ----------- */ @media only screen and (min-device-width : 800px) and (max-device-width : 1280px) and (orientation : portrait) { /* Styles */ } /* Desire + Galaxy S2 (portrait and landscape) ----------- */ @media only screen and (min-device-width : 480px) and (max-device-width : 800px) { /* Styles */ } /* Desire + Galaxy S2 (landscape) ----------- */ @media only screen and (min-device-width : 480px) and (max-device-width : 800px) and (orientation : landscape) { /* Styles */ } /* Desire + Galaxy S2 (portrait) ----------- */ @media only screen and (min-device-width : 480px) and (max-device-width : 800px) and (orientation : portrait) { /* Styles */ }
相关文章推荐
- PAT Perfect Sequence (25)
- UITableView优化
- String、StringBuffer与StringBuilder之间区别
- 获取iOS系统版本,谨慎使用[[[UIDevice currentDevice] systemVersion] floatValue]——【sdk缺陷】
- java中String stringBuffer StringBuider 深入理解
- leetcode--Unique Paths II
- UILable标签的设置
- UIKeyboard键盘
- Ios中,在UIImage中写文字的一点心得。
- UITextField输入中文限制
- iOS UIFont 初识
- 详细整理:UITableView优化技巧
- 详细整理:UITableView优化技巧
- leetcode--Unique Paths
- Android UI开源框架
- 【Java GUI】Java面板基础:JPanel
- 红色小圆点+数字的badge自定义小方法 by Nicky.Tsui
- 大神曝光Win10 Build 10134简体中文版
- d:mtex/texlocal/l3packages/xparse.sty:57: Undefined control sequence
- 关于UIButton中的ContentEdgeInsets的深入研究