1
<style>
2
a {font-size:9pt;color:#333;text-decoration:none;}
3
a:hover {color:#111;text-decoration:underline;}
4
</style>
5
6
<div id="marquees">
7
<a href="#">你可曾有过无数的梦想</a><br><br>
8
<a href="#">却在时光的流逝里幻灭</a><br><br>
9
<a href="#">你可曾对未来期待憧憬</a><br><br>
10
<a href="#">却在成长的岁月中迷失</a><br><br>
11
</div>
12
<script language="JavaScript">
13
marqueesHeight=200;
14
stopscroll=false;
15
with(marquees){
16
style.width=0;
17
style.height=marqueesHeight;
18
style.overflowX="visible";
19
style.overflowY="hidden";
20
noWrap=true;
21
onmouseover=new Function("stopscroll=true");
22
onmouseout=new Function("stopscroll=false");
23
}
24
document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden"></div>');
25
26
preTop=0; currentTop=0;
27
28
function init(){
29
templayer.innerHTML="";
30
while(templayer.offsetHeight<marqueesHeight){
31
templayer.innerHTML+=marquees.innerHTML;
32
}
33
marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
34
setInterval("scrollUp()",50);
35
}
36
document.body.onload=init;
37
38
function scrollUp(){
39
if(stopscroll==true) return;
40
preTop=marquees.scrollTop;
41
marquees.scrollTop+=1;
42
if(preTop==marquees.scrollTop){
43
marquees.scrollTop=templayer.offsetHeight-marqueesHeight;
44
marquees.scrollTop+=1;
45
}
46
}
47
</script>
48

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48
