How to scale iframe content (embedded using a WYSIWYG editor)?

I have this iframe code:

<iframe frameborder="0" height="549" scrolling="auto" src="http://change4life.artscience.co.uk/" width="520"></iframe>

Using a Drupal - I need to embed this iframe in to a page template (using a WYSIWYG editor) that is 520 wide. I know how to change the width and height but doing this doesnt actually scale the size of content within the iframe. This content is on a seperate server meaning I can not change the original content - as so is there any code out there so that I can scale the content? Bar in mind that I am limited to inline CSS/HTML as im working within a WYSIWYG editor on the page template within a CMS.

Hopefully there is something out there apart from zoom as that only seems to work in IE.


You can try scaling the iframe with a CSS 2D transform: https://developer.mozilla.org/en-US/docs/CSS/transform. Like this:

iframe {
    transform: scale(0.5);
}

I haven't tested it, but that's the only potential thing I can think of that might work...

链接地址: http://www.djcxy.com/p/15916.html

上一篇: 使用AngularJS设置WYMeditor的内容

下一篇: 如何扩展iframe内容(使用WYSIWYG编辑器嵌入)?