admin管理员组

文章数量:1435859

I am trying to embed an iframe containing a data visualization. I want the full contents of the graph to be visible on all device sizes (most of the utility comes from seeing the whole visualization). This would match the css property object-fit: contain. For example the intended behavior can be seen here under the Try it heading.

What I am getting now is more like object-fit:fill with a scrollbar. I have tried adjusting the height and width of the iframe to be responsive, but that isnt affecting how the content inside is set within the iframe. How can I make the content scale to be fully fit within the iframe or a parent element so that the full visualization is visible independent of the screen size?

本文标签: htmlHow can I make an iframe39s contents match the behavior of css39s objectfitcontainStack Overflow