如何处理 Windows 版 Safari 中的页面调整大小问题?
我使用firefox和Safari测试了以下代码。当我在firefox中缩放页面时,文本和图片都被缩放。但是,在Safari中,当我放大页面时,只有文本可以缩放,图片保持与原始尺寸相同..我该如何解决这个问题,以便在 Safari 中图片和文本都可以缩放?
<div id="head1">
<img src="images/homepage_09.png" width="397px" height="162px" alt="Nopic" title="" id="img_logo"/>
<img src="images/homepage_04.png" width="322px" height="275px" alt="Nopic" title="" id="img_pic1" />
<p id="txt_1">Scientific name "crocothemis order – mantodea"</p>
</div>
I tested the following code using firefox and Safari.When I zoomed the page in firefox, the text as well as the picture was scaled..However,in Safari,when I zoomed on the page, only the text could be scaled,the pictiure remained the same size as the original one..How can I fix this so that in Safari both the picture and the text can be scaled?
<div id="head1">
<img src="images/homepage_09.png" width="397px" height="162px" alt="Nopic" title="" id="img_logo"/>
<img src="images/homepage_04.png" width="322px" height="275px" alt="Nopic" title="" id="img_pic1" />
<p id="txt_1">Scientific name "crocothemis order – mantodea"</p>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该尝试使用可以调整大小的内联样式。
如果仍然不起作用,将图像作为某些 div 的背景应该是一个很好的解决方法,因为 Safari 的缩放功能会重新调整 div 的尺寸。
You should try with inline style that could be resized.
If it still doesn't work, putting your images as some div's background should be a good workaround as divs are redimensioned by Safari's zoom afaik.