?
このドキュメントでは、 php中國語ネットマニュアル リリース
已廢棄
此功能已過時。雖然它可能在某些瀏覽器中仍然有效,但由于可以在任何時候刪除它,所以不鼓勵使用它。盡量避免使用。
HTML marquee 元素(<marquee>)
用來插入一段滾動的文字。你可以使用它的屬性控制當文本到達容器邊緣發(fā)生的事情。
<marquee>
元素已經(jīng) 過時,請不要再使用。盡管一些瀏覽器仍然支持它,但它不是必須的。
behavior
設置文本在 marquee 元素內如何滾動。可選值有 scroll,slide
和 alternate。
如果未指定值,默認值為 scroll。
bgcolor
通過顏色名稱或十六進制值設置背景顏色。
direction
設置 marquee 內文本滾動的方向??蛇x值有 left
,right
,up
anddown。
如果未指定值,默認值為 left。
height
以像素或百分比值設置高度。
hspace
設置水平邊距。
loop
設置 marquee 滾動的次數(shù)。如果未指定值,默認值為 ?1,表示 marquee 將連續(xù)滾動.
scrollamount
設置每次滾動時移動的長度(以像素為單位)。默認值為 6。
scrolldelay
設置每次滾動時的時間間隔(以毫秒為單位)。默認值為 85。請注意, 除非指定 truespeed 值,否則將忽略任何小于 60 的值,并改為使用 60。
truespeed
默認情況下,會忽略小于60的scrolldelay值。如果存在truespeed,那些值不會被忽略。
vspace
以像素或百分比值設置垂直邊距。
width
以像素或百分比值設置寬度。
onbounce
當 marquee 滾動到結尾時觸發(fā)。它只能在 behavior 屬性設置為 alternate 時觸發(fā)。
onfinish
當 marquee 完成 loop 屬性設置的值時觸發(fā)。它只能在 loop 屬性設置為大于 0 的某個數(shù)字時觸發(fā)。
onstart
當 marquee 開始滾動時觸發(fā)。
start開始滾動 marquee。stop停止?jié)L動 marquee。
<marquee>This text will scroll from right to left</marquee> <marquee direction="up">This text will scroll from bottom to top</marquee> <marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid"> <marquee behavior="alternate">This text will bounce </marquee> </marquee>
規(guī)范 | 狀態(tài) | 評論 |
---|---|---|
HTML Living Standard該規(guī)范中'<marquee>'的定義。 | 生活水平 | 為了向后兼容,使其過時而傾向于CSS,但是定義了它的預期行為。 |
HTML5該規(guī)范中'<marquee>'的定義。 | 建議 | 為了向后兼容,使其過時而傾向于CSS,但是定義了它的預期行為。 |
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic Support | 1 | (Yes) | 1 | 2 | 7.2 | 1.2 |
behavior | 1 | (Yes) | 1 | 2 | 7.2 | 1.2 |
bgcolor | 1 | (Yes) | 1 | 2 | 7.2 | 1.2 |
direction | 1 | (Yes) | 1 | 2 | 7.2 | 1.2 |
height | 1 | (Yes) | 1 | 2 | 7.2 | 1.2 |
hspace | ? | (Yes) | 3 | ? | ? | ? |
loop | ? | (Yes) | 3 | ? | ? | ? |
scrollamount | 1 | (Yes) | 1 | 2 | 7.2 | 1.2 |
scrolldelay | 1 | (Yes) | 1 | 2 | 7.2 | 1.2 |
truespeed | No | (Yes) | 3 | 4 | No | No |
vspace | ? | (Yes) | 3 | ? | ? | ? |
width | 1 | (Yes) | 1 | 2 | 7.2 | 1.2 |
Feature | Android | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic Support | ? | ? | (Yes) | 1 | ? | ? | ? |
behavior | ? | ? | (Yes) | 1 | ? | ? | ? |
bgcolor | ? | ? | (Yes) | 1 | ? | ? | ? |
direction | ? | ? | (Yes) | 1 | ? | ? | ? |
height | ? | ? | (Yes) | 1 | ? | ? | ? |
hspace | ? | ? | (Yes) | 3 | ? | ? | ? |
loop | ? | ? | (Yes) | 3 | ? | ? | ? |
scrollamount | ? | ? | (Yes) | 1 | ? | ? | ? |
scrolldelay | ? | ? | (Yes) | 1 | ? | ? | ? |
truespeed | ? | ? | (Yes) | 3 | ? | ? | ? |
vspace | ? | ? | (Yes) | 3 | ? | ? | ? |
width | ? | ? | (Yes) | 1 | ? | ? | ? |