自适应的CSS代码片段(常用)
2014-07-30 16:07
357 查看
/* Smartphones (portrait and landscape) ----------- */ @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { /* Styles */ } /* Smartphones (landscape) ----------- */ @media only screen and (min-width : 321px) { /* Styles */ } /* Smartphones (portrait) ----------- */ @media only screen and (max-width : 320px) { /* 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 */ } /* Desktops and laptops ----------- */ @media only screen and (min-width : 1224px) { /* Styles */ } /* Large screens ----------- */ @media only screen and (min-width : 1824px) { /* Styles */ } /* iPhone 4 ----------- */ @media only screen and (-webkit-min-device-pixel-ratio:1.5), only screen and (min-device-pixel-ratio:1.5) { /* Styles */ }
相关文章推荐
- 常用的CSS代码片段
- CSS常用代码片段
- 常用的CSS代码片段+解读(系列)
- css 常用代码片段
- [z] DIV+CSS常用的网页布局代码
- DIV+CSS网页设计常用布局代码
- PHP-常用代码片段
- 收集的一些常用JS代码和CSS代码
- 一些常用的CSS代码(1)
- 网页设计【DIV+CSS常用的网页布局代码】
- DIV+CSS常用的Html网页布局代码
- CSS常用代码
- JS常用代码片段截取(三)
- JS常用代码片段截取
- JS常用代码片段截取
- HTML 事件与属性,网页设计中常用的CSS属性,HTML ASCII 代码参考手册
- 最常用的20个ASP代码片段 下
- CSS常用代码
- DIV+CSS常用的网页布局代码
- JS常用代码片段截取(二)