利用 CSS3 判断手机是横屏还是竖屏


@media screen and (orientation: portrait)
{ /*竖屏 css*/ } @media screen and (orientation: landscape) { /*横屏 css*/ }

 或者分开引入

<link rel="stylesheet" media="all and (orientation:portrait)" href="portrait.css">
<link rel="stylesheet" media="all and (orientation:landscape)" href="landscape.css">

 

posted @ 2015-12-09 14:31  Zion0707  阅读(248)  评论(0编辑  收藏  举报