一、網頁中的動態圖文
1、移動屬性的基本語法
通過<marquee>標記可以使得裏面放置的對象移動,對象移動的範圍是其所在的父對象的有效區域內。
<body>
<marquee>正在移動</marquee>
</body>
移動方向設置:
通過direction屬性可以控制移動的方向。默認屬性爲left,即爲從右向左。
<body>
<marquee direction="down">正在移動</marquee>
</body>
2、圖片的移動
<body>
<marquee width="600px" height="600px" bgcolor="#66666">
<img src="image/小兔子.jpg">
</marquee>
</body>
3、設置對象的移動
(1)文字移動的方向
<marquee direction="#">正在移動</marquee>
#可選擇left、 right、 up、 down
(2)文字的滾動循環
<marquee direction="left" behavior="#">正在ter滾動</marquee>
#可選擇爲scroll 、slide 、alternate 分別爲循環移動、只移動一次、來回移動
(3)文字的移動速度
1)移動速度設置
<marquee scrollamount=20>移動速度設置</marquee>
scrollamount的數值越大,移動的速度越快。
2)移動延時
<marquee scrolldelay=20>移動速度設置</marquee>
二、網頁多媒體
1、基礎知識
網頁多媒體可以播放flash、mid、wav、mp3等格式的多媒體文件。
基本語法:<embed src=url>
url表示多媒體的路徑。
2、設置自動播放
<embed>默認自動播放。通過autostart屬性設置。
語法:<embed src=url autostart=#>
#可選擇爲ture或false