<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Marquee</title>
</head>
<body>
<marquee scrollAmount=2 direction="left" scrolldelay="60"> <font size="4" color="blue">琅琊山二当家</font></marquee>
</body>
</html>
说明
从右向左移 代码 <marquee direction=left>需要移动的文字</marquee>
从左向右移 代码 <marquee direction=right>需要移动的文字</marquee>
<marquee scrollAmount=2 direction="left" scrolldelay="60"> 文字部分</marquee>
scrollAmount。它表示速度,值越大速度越快。如果没有它,默认为6,建议设为1~3比较好。
direction表示滚动的方向,默认为从右向左:←←←。可选的值有right、down、up。滚动方向分别为:right表示→→→,up 表示↑,down表示↓。
scrollDelay,这也是用来控制速度的,默认为90,值越大,速度越慢。通常scrollDelay是不需要设置的。