Implement the drive light effect on webform
Front-end:
<Marquee. Stop (). Start () scrollamount = 1 scrolldelay = 1 direction = left border = "1" style = "width: 31%; Height: 16px;">
<% = Structure %> </marquee>
Background:
Public String Structure = "";
The structure can be called.
Dynamic implementation
Front-end:
<Asp: Label runat = "server" text = "label"> </ASP: Label> </div>
Background:
Label1.text + = "<marquee. Stop (). Start () scrollamount = 1 scrolldelay = 15 direction = right> ";
For (INT I = 0; I <DV. Table. Rows. Count; I ++ ){
Label1.text + = string. Format ("<a href = \" {0 }\ "> {1} </a>" + "", "default2.aspx? Id = "+ DV. Table. Rows [I] [0]. tostring (), DV. Table. Rows [I] [3]. tostring ());
}
Label1.text + = "</marquee> ";
Basic marquee syntax
<Marquee>... </marquee>
Mobile attribute settings, such movement is not limited to text, but can also be applied to images, tables, and so on.
Direction
<Direction =#>#= left, right, up, down <marquee direction = left> shift from right to left! </Marquee>
Method
<Bihavior =###= scroll, slide, alternate <marquee behavior = scroll> go around in a circle! </Marquee>
<Marquee behavior = slide> just one stop! </Marquee>
<Marquee behavior = alternate> back and forth </marquee>
Loop
<Loop =#># = number of times; if not specified, the loop is not limited to (infinite) <marquee loop = 3 width = 50% behavior = scroll> 3 </marquee> <p>
<Marquee loop = 3 width = 50% behavior = slide> only take 3 </marquee>
<Marquee loop = 3 width = 50% behavior = alternate> only 3 trips! </Marquee>
Speed
<Scrollamount = #> <marquee scrollamount = 20> La la! </Marquee>
Latency
<Scrolldelay = #> <marquee scrolldelay = 500 scrollamount = 100> La la! Let's take a step and stop it! </Marquee>
Layout settings
Align)
<Align =#>#= top, middle, bottom <font size = 6>
<Marquee align = # width = 400> La la, I will move it! </Marquee>
</Font>
Background Color
<Bgcolor = #>#= rrggbb hexadecimal digital, or the following predefined colors:
Black, Olive, teal, red, blue, maroon, navy, gray, lime,
Fuchsia, white, green, purple, silver, yellow, Aqua <marquee bgcolor = aaaaee> color! </Marquee>
Area
<Height = # width =#> <marquee Height = 40 width = 50% bgcolor = aaeeaa> area! </Marquee>
Blank
(Margins) <Marquee hspace = 20 vspace = 20 width = 150 bgcolor = ffaaaa align = middle> area! </Marquee>
Direction
<Direction =#>#= left, right, up, down <marquee direction = left> shift from right to left! </Marquee>
Method
<Bihavior =###= scroll, slide, alternate <marquee behavior = scroll> go around in a circle! </Marquee>
<Marquee behavior = slide> just one stop! </Marquee>
<Marquee behavior = alternate> back and forth </marquee>
Loop
<Loop =#># = number of times; if not specified, the loop is not limited to (infinite) <marquee loop = 3 width = 50% behavior = scroll> 3 </marquee> <p>
<Marquee loop = 3 width = 50% behavior = slide> only take 3 </marquee>
<Marquee loop = 3 width = 50% behavior = alternate> only 3 trips! </Marquee>
Speed
<Scrollamount = #> <marquee scrollamount = 20> La la! </Marquee>
Latency
<Scrolldelay = #> <marquee scrolldelay = 500 scrollamount = 100> La la! Let's take a step and stop it! </Marquee>
Layout settings
Align)
<Align =#>#= top, middle, bottom <font size = 6>
<Marquee align = # width = 400> La la, I will move it! </Marquee>
</Font>
Background Color
<Bgcolor = #>#= rrggbb hexadecimal digital, or the following predefined colors:
Black, Olive, teal, red, blue, maroon, navy, gray, lime,
Fuchsia, white, green, purple, silver, yellow, Aqua <marquee bgcolor = aaaaee> color! </Marquee>