Ipad Mini Specfic CSS Media Queries?

2019-04-13 17:59发布

问题:

I have search a lot about CSS Specfic Media Queries for Ipad mini adn found this page. Which says this the Ipad Mini have 7.9 in 162 ppi. How to apply this properties in CSS Media Queries. Please help

回答1:

The iPad mini will just inherit the same viewport size as the original iPad. But for more precise, you can target pixel density of the iPad mini, so:

/* ipad Mini Portrait */
@media only screen and (width:768px) and (resolution: 163dpi) {

}

/* ipad Mini Landscape */
@media only screen and (width:1024px) and (resolution: 163dpi) {

}