最近,本人经常上一个网站:
http://51goc.com/
我发现里面的文字可以滚动!于是我上网查了查,查出了这个东西:
<marquee></marquee>
我赶紧试了试:
<marquee>Hello</marquee>
真能滚动!
其实还可以向右滚动:
<marquee direction="right">Hello</marquee>
还可以设定速度:
<marquee scrollamount="50">Fast</marquee>
<marquee scrollamount="5">Slow</marquee>
PS:注意这里单位是像素不是秒
讲解完了,看看样例吧:
<head>
<title>代码雨</title>
</head>
<body bgcolor="#000000">
<font color="#00ff00"><marquee direction="up">0101010101010 10101010101010101 010101010101010101010 1010101010 101010 1 0 10101010101010 10 10101010 1010101010101010101 01010101010101010101010101010101010101010</marquee></font>
<font color="#00ff00"><marquee direction="down">1010 10101010101010101010101010101010101010101 0101010101 010101010101 0101010101010 010101010101010 10101010101010101 01010101010101010101010101010101010101010</marquee></font>
<font color="#00ff00"><marquee direction="down">010101 010101010101010101010101 010101010101 0101010101010101 0101010101010 101 0101 0 1 0101010101010101 01010101010 1010101010101010101010101010101010101010101010</marquee></font>
<font color="#00ff00"