📄 backgroundscroller.html
字号:
<HTML>
<HEAD>
<TITLE>滚动背景</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript1.1">
<!--//
//y表示一开始字符距离页面顶部的距离﹔
var y=300
var bgticker
function initObjects() {
if (document.all) {
bgticker = document.all.bgtick.style
bgticker.posLeft = 0
bgticker.posTop = 400
mainbody = document.all.mainbod.style
mainbody.posLeft = 0
mainbody.posTop = 0
}
if (document.layers) {
bgticker = document.bgtick
bgticker.left = 0
bgticker.top = 300
mainbody = document.mainbod
mainbody.left = 0
mainbody.top = 0
}
scroll()
}
function scroll() {
if (y > -200) {
y--
if (document.all) {bgticker.posTop = y; mainbody.posTop=0}
if (document.layers) {bgticker.top = y; mainbody.top=0}
}
else {
y=300
}
var timer = setTimeout('scroll()',20)
}
//-->
</SCRIPT>
<STYLE>
.ticker {
position: absolute;
font-family:Arial;
color:DDDDDD;
font-size:55px;
letter-spacing:1;
}
body { font: 9pt; margin: 0px}
</STYLE>
</head>
<body onLoad="initObjects()" bgcolor="#FFFFFF">
<div align="center"><p><font size="5" face="Arial, Helvetica, sans-serif"><b><font color="#990099">滚动背景</font></b></font></p>
</div>
<div id="bgtick" class="ticker">
是不是找了很久了?嘿嘿嘿……快来欣赏吧!现在就将它用在你的网页上!<br><font color=red>http://www.sstp.com.cn
</font></div><font color=red><font>
<div id="mainbod" style="position:absolute; visibility:visible">
</div>
</font></font>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -