📄 40.html
字号:
<html>
<head>
<title>文字的升降效果</title>
</head>
<BODY>
<script language="JavaScript">
done = 0;
step = 4
function anim(yp,yk)
{
if(document.layers) document.layers["napis"].top=yp;
else document.all["napis"].style.top=yp;
if(yp>yk) step = -4
if(yp<60) step = 4
setTimeout('anim('+(yp+step)+','+yk+')', 50); //设置文字的升降速度
}
function start()
{
if(done) return
done = 1;
if(navigator.appName=="Netscape") {
document.napis.left=innerWidth/2 - 145;
anim(60,innerHeight - 60)
}
else {
napis.style.left=11;
anim(60,document.body.offsetHeight - 60)
}
}
</script>
<div id="napis" style="position: absolute;top: -50;color: green;font-family:宋体;font-size:10pt;">
<p>
你好,看见我在上下移动吗?
</p></div>
<script language="JavaScript">
setTimeout('start()',10);
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -