Is there an equivalent apple-touch-startup-image for the IPAD?

前端 未结 8 407
孤独总比滥情好
孤独总比滥情好 2020-12-28 16:20

For web apps you can set the startup screen with apple-touch-startup-image

What about for iPads?

相关标签:
8条回答
  • 2020-12-28 17:17

    I only got the startup image to work by making a PNG image with dimensions of 748x1024. This was tested on an iPad with firmware 3.2.1.

    0 讨论(0)
  • 2020-12-28 17:18

    Portrait image needs to be 768x1004 (note: 1004, not 1024, 20px is for status bar), PNG is the preferred file format.

    Landscape image needs to be 1024x748 (note: 748, again 20px for status bar). This image then needs to be rotated 90 degrees clockwise, end result is 748x1024.

    Link tags in header need to be as follows:

    <link rel="apple-touch-startup-image" href="images/splash_screen_768x1004.png" media="(device-width: 768px) and (orientation: portrait)" />
    <link rel="apple-touch-startup-image" href="images/splash_screen_1024x748.png" media="(device-width: 768px) and (orientation: landscape)" />
    

    For the new Retina iPad (if you don't add these, it will use the above with pixel doubling):

    <link rel="apple-touch-startup-image"
      href="images/splash_screen_1536x2008.png" 
      media="(device-width: 1536px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" />
    <link rel="apple-touch-startup-image"
      href="images/splash_screen_2048x1496.png"
      media="(device-width: 1536px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" />
    

    Previous answers (including the accepted answer) at time of posting this didn't work with my testing.

    0 讨论(0)
提交回复
热议问题