You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > webkitMarqueeSpeed
webkitMarqueeSpeed style property
Specifies or retrieves the speed of the scrolling mechanism in a marquee element.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: -webkit-marquee-speed |
Possible values:
The type of this property is string.
One of the following values:
Defines a fast scrolling speed. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
Integer, the amount of milliseconds between each step. | |||||||
Defines a normal scrolling speed. | |||||||
Defines a slow scrolling speed. |
Default: normal.
Example HTML code 1:
This example illustrates the use of the -webkit-marquee-speed property:
|
||||
<head> <style> #myMarquee { border: 1px dotted #000000; width: 200px; height: 60px; text-align: right; -webkit-marquee-direction: forwards; -webkit-marquee-increment: 1px; -webkit-marquee-repetition: infinite; -webkit-marquee-speed: fast; -webkit-marquee-style: scroll; } </style> </head> <body> <marquee id="myMarquee"> first line<br /> second line<br /> third line </marquee> </body> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the webkitMarqueeSpeed property in JavaScript:
|
||||
<head> <style> #myMarquee { border: 1px dotted #000000; width: 200px; height: 60px; text-align: right; -webkit-marquee-direction: forwards; -webkit-marquee-increment: 1px; -webkit-marquee-repetition: infinite; -webkit-marquee-speed: fast; -webkit-marquee-style: scroll; } </style> <script type="text/javascript"> function ChangeMarquee (select) { var marquee = document.getElementById ("myMarquee"); var selected = select.selectedIndex; var newValue = select.options[selected].text; if ('webkitMarqueeSpeed' in marquee.style) { marquee.style.webkitMarqueeSpeed = newValue; } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> <marquee id="myMarquee"> first line<br /> second line<br /> third line </marquee> <select onchange="ChangeMarquee (this);" size="7"> <option />slow <option />normal <option />fast <option selected="selected" />1 <option />10 <option />100 <option />1000 </select> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
Related pages:
External links:
User Contributed Comments