That's not true. You can use almost any style property/value pairs you like. Where you have something like so to initialize the crawler (from Step 2 on the demo page):
Code:
<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler',
style: {
'padding': '5px',
'width': '450px',
'background': 'lightyellow',
'border': '1px solid #CC3300'
},
inc: 8, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 4,
neutral: 150,
savedirection: true
});
The highlighted is known as a style object. It will be parsed into actual style and applied dynamically to the crawler. So you can put anything (within reason) that you like there. Adding a background image is fine, example:
Code:
style: {
'padding': '5px',
'width': '450px',
'background': 'lightyellow url(myimage.jpg)',
'border': '1px solid #CC3300'
},
or:
Code:
style: {
'padding': '5px',
'width': '450px',
'background-image': 'url(myimage.jpg)',
'border': '1px solid #CC3300'
},
Just be sure to follow the quoting convention of the style object (also from the demo page):
Style object for this marquee container (
use quotes on both sides of the : as shown) (defaults to {'margin': '0 auto'}, which centers a marquee) If no width is specified it will default to 100%, if no height is specified, it will default to the offsetHeight of the marquee contents. Marquees whose specified or default width is greater than their contents will be automatically shrunk to avoid empty spots.
Bookmarks