-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.html
124 lines (101 loc) · 7.67 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
title: HTMLMarqueeElement
slug: Web/API/HTMLMarqueeElement
tags:
- API
- Deprecated
- HTML DOM
- Interface
- Reference
---
<p>{{APIRef("HTML DOM")}}{{Draft}}{{Deprecated_Header}}</p>
<p><span class="seoSummary">The <strong><code>HTMLMarqueeElement</code></strong> interface provides methods to manipulate {{HTMLElement("marquee")}} elements.</span> It inherits properties and methods from the {{DOMxRef("HTMLElement")}} interface.</p>
<p>{{InheritanceDiagram}}</p>
<h2 id="Properties">Properties</h2>
<p><em>Inherits properties from its parent, {{DOMxRef("HTMLElement")}}.</em></p>
<dl>
<dt>{{DOMxRef("HTMLMarqueeElement.behavior")}}</dt>
<dd>Sets how the text is scrolled within the marquee. Possible values are <code>scroll</code>, <code>slide</code> and <code>alternate</code>. If no value is specified, the default value is <code>scroll</code>.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.bgColor")}}</dt>
<dd>Sets the background color through color name or hexadecimal value.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.direction")}}</dt>
<dd>Sets the direction of the scrolling within the marquee. Possible values are <code>left</code>, <code>right</code>, <code>up</code> and <code>down</code>. If no value is specified, the default value is <code>left</code>.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.height")}}</dt>
<dd>Sets the height in pixels or percentage value.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.hspace")}}</dt>
<dd>Sets the horizontal margin.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.loop")}}</dt>
<dd>Sets the number of times the marquee will scroll. If no value is specified, the default value is −1, which means the marquee will scroll continuously.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.scrollAmount")}}</dt>
<dd>Sets the amount of scrolling at each interval in pixels. The default value is 6.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.scrollDelay")}}</dt>
<dd>Sets the interval between each scroll movement in milliseconds. The default value is 85. Note that any value smaller than 60 is ignored and the value 60 is used instead, unless <code>trueSpeed</code> is <code>true</code>.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.trueSpeed")}}</dt>
<dd>By default, <code>scrollDelay</code> values lower than 60 are ignored. If <code>trueSpeed</code> is <code>true</code>, then those values are not ignored.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.vspace")}}</dt>
<dd>Sets the vertical margin.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.width")}}</dt>
<dd>Sets the width in pixels or percentage value.</dd>
</dl>
<h3 id="Event_handlers">Event handlers</h3>
<dl>
<dt>{{DOMxRef("HTMLMarqueeElement.onbounce")}}</dt>
<dd>Fires when the marquee has reached the end of its scroll position. It can only fire when the behavior attribute is set to <code>alternate</code>.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.onfinish")}}</dt>
<dd>Fires when the marquee has finished the amount of scrolling that is set by the loop attribute. It can only fire when the loop attribute is set to some number that is greater than 0.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.onstart")}}</dt>
<dd>Fires when the marquee starts scrolling.</dd>
</dl>
<h2 id="Methods">Methods</h2>
<p><em>Inherits methods from its parent, {{DOMxRef("HTMLElement")}}.</em></p>
<dl>
<dt>{{DOMxRef("HTMLMarqueeElement.start()")}}</dt>
<dd>Starts scrolling of the marquee.</dd>
<dt>{{DOMxRef("HTMLMarqueeElement.stop()")}}</dt>
<dd>Stops scrolling of the marquee.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<pre class="brush: html line-numbers language-html"><code class="language-html"><span class="tag token"><span class="tag token"><span class="punctuation token"><</span>marquee</span><span class="punctuation token">></span></span>This text will scroll from right to left<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>marquee</span><span class="punctuation token">></span></span>
<span class="tag token"><span class="tag token"><span class="punctuation token"><</span>marquee</span> <span class="attr-name token">direction</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>up<span class="punctuation token">"</span></span><span class="punctuation token">></span></span>This text will scroll from bottom to top<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>marquee</span><span class="punctuation token">></span></span>
<span class="tag token"><span class="tag token"><span class="punctuation token"><</span>marquee</span> <span class="attr-name token">direction</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>down<span class="punctuation token">"</span></span> <span class="attr-name token">width</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>250<span class="punctuation token">"</span></span> <span class="attr-name token">height</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>200<span class="punctuation token">"</span></span> <span class="attr-name token">behavior</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>alternate<span class="punctuation token">"</span></span><span class="language-css style-attr token"><span class="attr-name token"> <span class="attr-name token">style</span></span><span class="punctuation token">="</span><span class="attr-value token"><span class="property token">border</span><span class="punctuation token">:</span>solid</span><span class="punctuation token">"</span></span><span class="punctuation token">></span></span>
<span class="tag token"><span class="tag token"><span class="punctuation token"><</span>marquee</span> <span class="attr-name token">behavior</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>alternate<span class="punctuation token">"</span></span><span class="punctuation token">></span></span>
This text will bounce
<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>marquee</span><span class="punctuation token">></span></span>
<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>marquee</span><span class="punctuation token">></span></span></code></pre>
<p>{{EmbedLiveSample("Examples", 600, 450)}}</p>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName("HTML WHATWG","obsolete.html#htmlmarqueeelement","HTMLMarqueeElement")}}</td>
<td>{{Spec2("HTML WHATWG")}}</td>
<td>Made obsolete in favor of CSS but define its expected behavior for backward compatibility.</td>
</tr>
<tr>
<td>{{SpecName("HTML5.2","obsolete.html#htmlmarqueeelement","HTMLMarqueeElement")}}</td>
<td>{{Spec2("HTML5.2")}}</td>
<td>No changes.</td>
</tr>
<tr>
<td>{{SpecName("HTML5.1","obsolete.html#htmlmarqueeelement-htmlmarqueeelement","HTMLMarqueeElement")}}</td>
<td>{{Spec2("HTML5.1")}}</td>
<td>No changes.</td>
</tr>
<tr>
<td>{{SpecName("HTML5 W3C","obsolete.html#htmlmarqueeelement","HTMLMarqueeElement")}}</td>
<td>{{Spec2("HTML5 W3C")}}</td>
<td>Made obsolete in favor of CSS but define its expected behavior for backward compatibility.</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{Compat("api.HTMLMarqueeElement")}}</p>
<h2 id="See_also">See also</h2>
<ul>
<li>{{HTMLElement("marquee")}}</li>
</ul>