案例:HTML DOM案例     状态:可编辑再运行    进入横版
x
    document.getElementById('display').style.clip="rect(" + (startPosition + 1) + " 100 " + (startPosition + endPosition) + " 0)"
 
1
<html>
2
<head>
3
<style>
4
span
5
{
6
font:12px arial;
7
background:#CCCCCC;
8
position:absolute;
9
width:100;
10
height:500;
11
top:100;
12
clip:rect(0 100 100 0);
13
}
14
</style>
15
<script type="text/javascript">
16
var interval
17
startPosition=0
18
topPosition=100
19
endPosition=100
20
speed=50
21
22
function scrollit()
23
{
24
if (startPosition!=200)

 运行结果 
 北美留学生论坛