0

我正在构建我的个人页面,这是一台在屏幕内带有 iframe 的计算机,带有一个虚拟的 javascript 终端。我的问题是,当我继续在终端上书写时,我无法让 iframe 向下滚动。

我尝试添加scrolling="yes"到 iframe,但它不起作用。我尝试$(document).scrollTop($(document).height());在iframed页面中使用并将 iframed 页面的高度设置为 2000px ......这些都不起作用。

这是页面的代码:

<html>
<head>
<style type="text/css">
body{
background-image:url('http://api.ning.com/files/B4MPF1W8yyhcpqgtcWbw-UuRX4aul676AQ0rB63HYNkXgQR06pGjZVwjKcwMxGgc/apple2c.big.jpg');
background-repeat:no-repeat;
}
#iframe {
position:relative;
padding-top:35px;
padding-left:144px;
}
</style>
</head>
<body>
<div id="iframe">
<iframe src="http://static.saezmedia.com/terminal/terminal/examples/rpc-demo.html" width="458" height="341" scrolling="auto"></iframe></div>

</body>
</html>

非常感谢您的帮助。

4

2 回答 2

1

In you main page: http://static.saezmedia.com/terminal/terminal/examples/rpc-demo.html you have the following css code:

jquery.terminal.css:13:

overflow:hidden;

this makes the scroll bar non visible. If you remove this the page is scrollable and then you have to automatically scroll to the bottom.

于 2012-08-18T20:44:41.757 回答
0

如果您在另一个窗口中打开它,您也将无法滚动它。

这看起来像是网站的问题。

但是,您可以通过固定 iframe 的宽度/高度并在包含的 div 上设置溢出自动来显式滚动它。

于 2012-08-18T20:16:34.407 回答