I would like to scale an iframe on mobile safari.
I am including an iframe inside a div.
<html>
<body>
<div id="iframe_container">
<iframe src="http://jsfiddle.net/viebel/kTzDS/show" style="width:300px;height:300px;"/>
</div>
</body>
</html>
Now I am scaling the div with this code:
$(function() {
$('#iframe_container').css({
'-webkit-transform': 'scale(0.7)',
'-webkit-transform-origin': '0 0 '
});
});
On iOS/Safari, the iframe is cut (i.e. can’t be entirely seen) while on desktop/chrome, the iframe is not cut.
Here is a jsfiddle page with the code: http://jsfiddle.net/viebel/tJQUH/
Just to clarify: here is a demo page that demonstrates the real problem – when opened on iPad/iPhone Safari – all the three lines should be of the same size: http://jsfiddle.net/viebel/tJQUH/show
Please advice what can I do to see the iframe on Mobile Safari completely uncut?
I have made few changes.Especially make the frame-size as 100%. Then try to scale the iframe itself.Check this out
Link to jsfiddle:
http://jsfiddle.net/viebel/tJQUH/13