Max image width in Mobile Safari? Getting unwanted downscaling on panos

前端 未结 3 670
伪装坚强ぢ
伪装坚强ぢ 2020-12-18 08:26

I want to display very wide, panoramic images in Mobile Safari (iPhone, iPod, iPad). These work fine in OS X Safari and in other browsers, but on Mobile Safari there seems t

相关标签:
3条回答
  • 2020-12-18 08:43

    If you're using DIV with background attribute and you know the size of the image then set background-size attribute with image width and height.

    background-size:3028px 750px
    

    If using img tag then set the width and height values

    <img src="image.jpg" width="3028px" height="750px" />
    

    then it should work.

    0 讨论(0)
  • 2020-12-18 08:45

    Late to the game, but I had the same question and ended up getting the info from the horse's mouth here: Apple Safari Docs down at the Know iOS Resource Limits topic. Lot's of potential gotchas in there.

    0 讨论(0)
  • 2020-12-18 09:00

    I found something about the rules that are applied whether an image is automatically downscaled in mobile safari:

    http://teknocat.org/blog/computer-stuff/web-development/show/6/mobile-safari-background-image-scaling-quirk

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