问题
I have an iframe that calls an external page, like <iframe src="http://pagewithimage.php/?parameter=xxx" style='border:0;width:100%'></iframe>. The pagewithimage.php got an image that can be bigger that the iframe area, and undesired scroll bars appears. I'd like to scale the iframe content to fit it "100%", not more than it.
The code I'm using is this:
> <div class='container-home-map' style="background-color:#99CCCC;border-radius:10px;">
> <iframe src="http://pagewithimage.php/?parameters=AAA" style='border:0;width:100%;transform:scale(1.0)'></iframe>
> </div>
Where http://pagewithimage.php is a page that calls a code with parameters that generates an image with a size sent among the parameters. This image may be bigger that the iframe depending on the screen, so, My question is: can I scale the content to always fit the iframe? (not resize the iframe, but resize its content)
来源:https://stackoverflow.com/questions/43666373/how-to-make-it-sure-that-an-iframe-content-fits-it