How to target CSS for iPad but exclude Safari 4 desktop using a media query?

后端 未结 3 767
攒了一身酷
攒了一身酷 2020-12-05 03:11

I am trying to use a media rule to target CSS to iPad only. I want to exclude iPhone/iPod and desktop browsers. I would like to to also exclude other mobile devices if possi

3条回答
  •  攒了一身酷
    2020-12-05 03:52

    I use PHP to do that. I isolate the plateform from the USER_AGENT string. Then I only have to use a if($plateform == 'iPad') {.....} It's that easy!

提交回复
热议问题