2010-11-19 28 views
21

當一個選框離開屏幕後,在短時間間隔後從另一側進入。 有什麼辦法可以縮短這個時間嗎?有沒有可能改變HTML的<marquee>標籤的速度?

+13

我認爲這是一個笑話。 – 2010-11-19 17:03:35

+0

@TJCrowder〜又名:請重新設計您的網站概念? – jcolebrand 2010-11-19 17:06:55

+4

請注意,選取框標記從來不是標準的HTML,因此不推薦使用。 – Orbling 2010-11-19 17:10:18

回答

2

scrolldelay="number"

+0

另請參閱Google或任何無數退貨,例如:http://www.htmlcodetutorial.com/_MARQUEE。html – jcolebrand 2010-11-19 17:07:24

+0

這隻會減慢它,並不會減少'刷新'之間的時間 – 2010-11-19 17:10:11

+2

也考慮谷歌搜索**「不要使用選取框標記」**有許多很好的理由,自九十年代後期以來,瞭解,爲什麼你可能會希望爲了避免使用HTML的這種特殊功能... – 2010-11-19 17:12:17

5

沒有特別以控制的屬性。無論如何,Marquee並不是一個高度可靠的標籤。你可能要考慮使用jQuery和.animate()函數。如果您有興趣追求該途徑並需要代碼,請告訴我。

+0

有沒有一個屬性來控制它?那麼其他公佈的答案是關於什麼的?嗯...... – jcolebrand 2010-11-19 17:10:03

+1

他是對的,從技術上說:'scrolldelay'放慢了整個動畫,並不是特定於文本從一個邊緣滾動並重新出現在另一個邊緣之間的延遲。查看該網頁上的示例。 – 2010-11-19 17:13:30

27
<marquee behavior=scroll direction="left" scrollamount="5">Your message here</marquee> 

scrollamount控制文本的速度:更高更高的值是滾動速度

+0

現在,這是一個答案!我不敢相信我必須在2013年使用跑馬燈! – 2013-09-02 14:01:41

16

我們可以通過使用scrollamount屬性控制滾動速度,

實施例:

<marquee scrollamount="30">scrolling fast</marquee> 
<marquee scrollamount="2">scrolling slow</marquee> 

注意:如果指定最小數量,滾動速度將相應減小

2

您可以使用scrollamount屬性更改選取框標記的速度。

它接受整數值6作爲默認速度,所以任何小於6的值都會減慢選取框效果。

例子:

<marquee scrollamount=4>Scrolling text</marquee> 

瞭解更多:​​

http://www.htmlcodetutorial.com/_MARQUEE_SCROLLAMOUNT.html

P.S:避免使用字幕!

+0

跑馬燈非常易於使用,但即使在低速情況下也會閃爍。什麼是選擇框的好選擇? – newman 2015-05-07 14:30:14

0
  <body> 
     <marquee direction="left" behavior=scroll scrollamount="2">This is basic example of marquee</marquee> 
     <marquee direction="up">The direction of text will be from bottom to top.</marquee> 
     </body> 

使用scrollamount來控制速度..

4

該屬性發生在毫秒的時間。

延遲:100毫秒

<marquee scrolldelay="100">Scrolling text</marquee> 

延遲:400毫秒

<marquee scrolldelay="400">Scrolling text</marquee> 
-1
<body> 
    <marquee direction="left" behavior=scroll scrollamount="2">This is basic example of marquee to control the speed of marquee.</marquee> 
    <marquee direction="up">This is an Example of Marquee.The direction of text will be from bottom to top.</marquee> 
    </body> 
+0

假設您剛從http://stackoverflow.com/a/32409547/5516239複製代碼? – Nathangrad 2016-08-03 09:06:31

相關問題