css 判斷 移動設備 橫屏 或 豎屏

//判斷 移動設備

  if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad|Mobile)/i))) {

 window.location.href = 'file:///E:/瀾途集思網站/2017LanTo-s/2017Mobile/index.html';

            }



//豎屏

@media all and (orientation : portrait){ }


//橫屏

@media all and (orientation : landscape) { /*橫屏時字體綠色*/

  .p2txt i{font-size:1.4em;font-weight: 500;   display: inline;margin-right:.5em;}


}


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章