I am trying to fit the contents of the webpage into an iframe whose dimensions are fixed.

I need to resize the page such that the complete page fits in the given dimensions of the iframe without truncation.

And I do not need scrollbar, the page should fit without a scrollbar.

I have tried something like this, but didn't work.

<iframe width="650" height="350" src="http://www.bbc.co.uk" style="-ms-transform: scale(,);"></iframe>
有帮助吗?

解决方案

I'm afraid you cannnot. you options would be use site speicfic css to reduce the size of elements.

if you don't want scroll-bars try overflow:hidden css property.

Check this stack overflow duplicate

其他提示

As given dimensions of iframe , you don't need scroll bar , So just add scrolling="no"

Check this

<iframe width="650" height="350" scrolling="no" src="http://www.bbc.co.uk"></iframe>

Preeti Chawla, Web developer

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top