移动端判断横屏竖屏
1. CSS判斷橫屏豎屏
寫在同一個(gè)CSS中
@media screen and (orientation: portrait) {
/*豎屏 css*/
}
@media screen and (orientation: landscape) and (min-width:450px){
/*橫屏 css*/
}
分開(kāi)寫在2個(gè)CSS
豎屏
<link rel="stylesheet" media="all and (orientation:portrait)" href="portrait.css">
橫屏
<link rel="stylesheet" media="all and (orientation:landscape)" href="landscape.css">
2. JS判斷橫屏豎屏
?
轉(zhuǎn)載于:https://www.cnblogs.com/mengff/p/5395921.html
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來(lái)咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)總結(jié)
- 上一篇: 九宫格拼图 支持44 55等
- 下一篇: APP流氓大法之apk 静默安装