前端基礎-HTML文字滾動
- 2020 年 4 月 7 日
- 筆記
1.文字滾動
<html> <head> <title>我的第一個頁面</title> </head> <body> <marquee behavior="scroll" direction="up" height="30" style="overflow:hidden;" scrollamount="1" width="300" onMouseOver="stop()" onMouseOut="start()"> 雷電黃色預警!<br /> 大雨黃色預警!<br /> </marquee> </body> </html>
direction:方向
up:上 down:下 left:左 right:右
scrollamount:滾動速度—————–scroll:滾動 amount:數值
width:寬度 height:高度
onmouseover:當滑鼠移上去
onmouseout:當滑鼠離開
stop():停止
start():開始
behavior:
scroll 循環滾動
alternate 來回滾動
slide 滾動一次停止