【发布时间】:2015-06-08 19:21:56
【问题描述】:
我创建了一个包含 iframe 的网页。我想使用浏览器滚动条滚动 iframe 内容。这是我的代码:
<html>
<head>
<script src = "jquery-2.1.4.min.js">
</script>
<script src = "iframe.js">
</script>
<style>
button{
position : relative;
}
</style>
</head>
<body>
<div class = "frame">
<iframe src = 'demo.html' id = "sd" frameBorder='0' scrolling = "no" height = "100%" width = '100%'>
</iframe>
</div>
<button id ="zoomIn">
zoom in
</button>
</body>
</html>
单击zoomIn 按钮时,我希望 iframe 内的内容增加其大小。 iframe 中不应有任何滚动条,但滚动应由浏览器完成。
【问题讨论】:
标签: javascript jquery html css iframe