[英]Zoom into div on page load with javascript
Bit of a strange issue but I couldn't find anything about this on Google. 有点奇怪的问题,但我在Google上找不到任何相关信息。 I have a scene I'd like to zoom into when the page loads.
页面加载时,我想放大一个场景。
Imagine the below image is 100% window
width on page load, then after a delay the window zooms in so the monitor in the scene is 100% of the browser window. 想象下面的图像是页面加载时
window
宽度的100%,然后在延迟一段时间后窗口会放大,因此场景中的监视器是浏览器窗口的100%。 and the iframe is what you now see. 现在您将看到iframe。
Does this make sense? 这有意义吗?
I'm unsure of the best way to do this, I tried to use transform
property with scale but I've had no luck and I'm unsure how this would render the iframe? 我不确定执行此操作的最佳方法,我尝试按比例使用
transform
属性,但是我没有运气,也不确定如何渲染iframe? would the contents also scale? 内容也会缩放吗?
http://jsfiddle.net/LLmaP/1/ http://jsfiddle.net/LLmaP/1/
you should do something like this: 您应该执行以下操作:
http://jsfiddle.net/LLmaP/18/ http://jsfiddle.net/LLmaP/18/
$('.monitor').load(function() {
setTimeout(function() {
$('.page').addClass('fullscreen');
}, 1000);
});
but you have to set your cubic-bezier to make the background-size and the iframe height agree. 但是您必须设置三次贝塞尔曲线以使背景尺寸和iframe高度一致。 this website can help you
该网站可以为您提供帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.