-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hallo all,
i have a iframe to show a pdf. After the pdf is loaded i will change the zoom-faktor with this css-code
<style> .iframe { zoom: 1.25; -moz-transform: scale(1.35); -moz-transform-origin: 0 0; -o-transform: scale(1.35); -o-transform-origin: 0 0; -webkit-transform: scale(1.35); -webkit-transform-origin: 0 0; } </style>
How can i change the sclass from the iframe after the pdf is rendered?
Thx for the help
Andi
Hi Andi,
I have create a sample in zkfiddle:
<zk>
<window border="normal" title="hello">
<div>Welcome to ZK Fiddle , run it right now!</div>
<button id="btn" label="Click Me" />
</window>
</zk>
<zk>
<style>
.iframe {
zoom: 1.25;
-moz-transform: scale(1.35);
-moz-transform-origin: 0 0;
-o-transform: scale(1.35);
-o-transform-origin: 0 0;
-webkit-transform: scale(1.35);
-webkit-transform-origin: 0 0;
}
</style>
<script>
function changeStyle () {
var iframe = zk.Widget.$('$iframe');
jq(iframe.$n()).addClass('iframe');
}
</script>
<iframe id="iframe" src="test.zul" width="100%" height="300px" xmlns:ca="client/attribute" ca:onload="changeStyle()"/>
</zk>
You can also refer to document here.
Asked: 2012-07-15 22:17:40 +0800
Seen: 127 times
Last updated: Jul 18 '12