min-width media query not working on ipad?

后端 未结 6 707
被撕碎了的回忆
被撕碎了的回忆 2021-02-05 20:43

Why isnt the following media query being picked up on iPads in landscape mode?

@media all and (min-device-width: 1000px) {
    css here
}

Or

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-05 21:21

    From http://perishablepress.com/press/2010/10/20/target-iphone-and-ipad-with-css3-media-queries/

    /* iPad [portrait + landscape] */
    @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
        .selector-01 { margin: 10px; }
        .selector-02 { margin: 10px; }
        .selector-03 { margin: 10px; }
    }
    

    It looks like the screen attribute may be required.

提交回复
热议问题