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.
精彩评论