|
ไอที |
HTML |
45931
การใช้ Marquee Code ในภาษา HTML
marquee tag เอาไว้ใช้ สำหรับ ทำให้ตัวอักษรเคลื่อน ที่ นั่นคือ เลื่อนไปเลื่อนมานั่นเอง ส่วนจะเลื่อนไปทางไหน ความเร็วยังไงงั้น ต้องมาปรับแต่งกันเอาครับ ดังนั้น ในบทความนี้ ผมจึงมานำเสนอวิธีการปรับแต่ง marquee tag ต่าง ๆ ไม่ว่าจะเป็น ความเร็ว ทิศทาง และอื่น ๆ
การใช้ marquee tag นั้น จะขึ้นต้นด้วย <marquee> และปิดท้ายด้วย </marquee>
ตัวอย่างการใช้งาน marquee tag เบื้องต้น
Code
<html>
<head></head>
<body>
<marquee>Basic Marquee Tag</marquee>
</body>
</html>
Output
การปรับแต่ง Behavior ใน Marquee tag
BEHAVIOR=SCROLL
this code |
produces this |
<marquee behavior="SCROLL">Hello</marquee>
|
|
BEHAVIOR=SLIDE
this code |
produces this |
<marquee behavior="SLIDE">Hello</marquee>
|
|
BEHAVIOR=ALTERNATE
this code |
produces this |
<marquee behavior="ALTERNATE">Hello</marquee>
|
|
การปรับแต่ง Direction ใน Marquee tag
Direction=LEFT
this code |
produces this |
<marquee direction="LEFT">Hello</marquee>
|
|
Direction=RIGHT
this code |
produces this |
<marquee direction="RIGHT">Hello</marquee>
|
|
Direction=UP
this code |
produces this |
<marquee direction="UP">Hello</marquee>
|
|
Direction=DOWN
this code |
produces this |
<marquee direction="DOWN">Hello</marquee>
|
|
การปรับแต่ง Scrolldelay ใน Marquee tag
Scrolldelay เป็นค่า Default
this code |
produces this |
<marquee>Hello</marquee>
|
|
Scrolldelay=500
this code |
produces this |
<marquee scrolldelay="500">Hello</marquee>
|
|
Scrolldelay=1000
this code |
produces this |
<marquee scrolldelay="1000">Hello</marquee>
|
|
การปรับแต่ง Scrollamount ใน Marquee tag
Scrollamount เป็นค่า Default
this code |
produces this |
<marquee>Hello</marquee>
|
|
Scrollamount=20
this code |
produces this |
<marquee scrollamount="20">Hello</marquee>
|
|
Scrollamount=50
this code |
produces this |
<marquee scrollamount="50">Hello</marquee>
|
|
การปรับแต่ง Loop ใน Marquee tag
Loop=40
this code |
produces this |
<marquee behavior="SCROLL" loop="40">Hello</marquee>
|
|
Loop=20
this code |
produces this |
<marquee behavior="SLIDE" loop="20">Hello</marquee>
|
|