Media query ipad vs iphone4

后端 未结 5 1113
别跟我提以往
别跟我提以往 2020-12-28 08:47

I am using the media query in css to differentiate iphone and ipad

Here\'s my code:

/* iphone 3 */
@media only screen and (min-device-width : 320px)          


        
5条回答
  •  时光说笑
    2020-12-28 09:11

    iOS does not currently support orientation:portrait and orientation:landscape.
    Instead Apple currently uses the following:

    Portrait
    orientation:0
    orientation:180 (not currently supported on iphone)

    Landscape
    orientation:90
    orientation:-90

    Ref: http://developer.apple.com/library/safari/#documentation/DataManagement/Reference/DOMWindowAdditionsReference/DOMWindowAdditions/DOMWindowAdditions.html

提交回复
热议问题