-1

I have an iframe with a single object inside (and svg). The iframe is 640x480 pixels. The svg as reported by chrome inspector is also 640x480. However the body of the iframe is reported to be 640x482 pixels and so scrollbars show up. I know I can set the iframe to overflow: hidden to cut off the content, or make the svg smaller, but I would like the iframe content to match the size of the iframe exactly.

I have tried setting all of these things to 0 on body, div, svg, html and iframe:

border: 0;
padding: 0;
outline-width: 0;
margin: 0;

Am I forgetting something?

4

1 回答 1

0

Ahh, I added display: block; to my SVG style and this fixed it!

于 2012-12-28T05:11:34.627 回答