jpg image not displaying in safari (iphone 3gs and ipod)

瘦欲@ 提交于 2019-12-25 04:22:10

问题


I have this image : "http://interstatic01.gameloft.com/igp/videos/images/d9/end_screen_71.jpg" In this very simple html, it doesn't display for the 2 devices mentioned in the title.

 <!DOCTYPE html>
 <html>
<head>

</head>
<body>
    <div ><!-- it may show full image depending on browsers, eg: firefox  -->
        <img src="https://i.stack.imgur.com/nXxT5.jpg"   />
    </div>              
</body>
</html>

Note: if i enter the url directly in the url bar of the safari browser, i can see it. It just happens when it is in a tag or when set as css background


回答1:


The image is simply too large for these devices (see the Know iOS Resource Limits section). You need to serve a smaller image for these devices (how this is done is a different question to which I don't know the answer).

William Malone has a Maximum Image Size Calculator that allows you to enter an image size and it tells you which devices are capable of displaying an image of that size.



来源:https://stackoverflow.com/questions/22073629/jpg-image-not-displaying-in-safari-iphone-3gs-and-ipod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!