开发者

Image zooming out in Firefox. Need to click on it to get actual size

I'm trying to display an image within an iFrame on my page. The problem I face is that in Firefox, the image seems to be zoomed out automatically. I need to click on it to get the actual size. I know there is a manual fix for this by doing the following:

Enter about:config in Firefox address bar.
Look for browser.enable_automatic_image_resizing 
Change the value to false
开发者_如何学编程

I was wondering though if there was something I could write on my script that would automatically take care of it?


You can use a div to get the same result as an iframe but without the resizing:

<html>
  <head>
    <title>foo</title>
  </head>
  <body>
    <div style='overflow: scroll; width: 300px; height: 300px;'><img src="image.png" /></div>
  </body>
</html>


If you set the image as a background image it should stop FF from scaling it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜