Media query to target iphone/mobile/ipad

后端 未结 3 1548
孤城傲影
孤城傲影 2021-02-04 23:06

I am using media query to target iphone/ipad/mobile.

I have written the following media query.

But my problem is if i write css in media query of mobile \'max-d

3条回答
  •  离开以前
    2021-02-04 23:23

    Rajnikant's answer is indeed the correct one, except that the iPad max-width is wrong. It should be 768px:

    /* For ipad: */
    @media screen and (max-width : 768px){} 
    

提交回复
热议问题