- ipad及以下,所有小于、不等于960宽度的平板电脑
@media only screen and (max-width:959px){}
- 仅ipad竖版,所有小于(不等于)960宽度的平板电脑竖版
@media only screen and (min-width:768px) and (max-width:959px){}
- iphone及以下
@media only screen and (max-width:767px){}
- 仅iphone 横版,包括某些平板电脑的竖版
@media only screen and (min-width:480px) and (max-width:767px){}
- 仅iphone4竖版
@media only screen and (max-width:479px){}
- 竖屏下
@media all and (orientation:portrait){}
- 横屏下
@media all and (orientation:landscape){}
本文介绍了如何使用CSS媒体查询来针对不同尺寸和方向的屏幕进行样式调整,包括iPad、iPhone等设备的横竖屏适配。
582

被折叠的 条评论
为什么被折叠?



