marquee標籤單個滾動效果
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>marquee</title>
</head>
<body style="background: black;padding: 20px;">
<marquee><span style="font-weight: bolder;font-size: 40px;color: white;">Welcom CSDN!</span></marquee>
</body>
</html>
marquee標籤多個文字滾動效果
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>marquee</title>
<style>
body {
background: black;
padding: 20px;
}
marquee {
font-weight: bolder;
font-size: 40px;
color: white;
}
</style>
</head>
<body>
<marquee direction="up">UP</marquee>
<marquee direction="down">DOWN</marquee>
<marquee direction="left">LEFT</marquee>
<marquee direction="right">RIGHT</marquee>
</body>
</html>
設置滾動速度和延遲(scrolldelay:延遲、scrollamount:速度)
<marquee scrolldelay="800" scrollamount="100">Welcom CSDN!</marquee>
限制滾動文字的行爲(alternate:來回、scroll:循環滾動、slide:只滾動一次)
滾動的方向(left、right、down、up)