<!-- css -->
@media only screen and (max-device-width: 1024px) and (orientation:portrait) {
.landscape { display: none; }
}
@media only screen and (max-device-width: 1024px) and (orientation:landscape) {
.portrait { display: none; }
}
<!-- example markup -->
<h1 class="portrait">Your device orientation is "portrait"<h1>
<h1 class="landscape">Your device orientation is "landscape"<h1>
热门信息
阅读 (133)
1 不使用表格实现跨浏览器垂直水平居中图片阅读 (132)
2 CSS基础内容复习阅读 (130)
3 跨浏览器透明度阅读 (129)
4 iPad 定向CSS阅读 (128)
5 更改选中文本的样式