QCadnet

24 thg 3, 2012

Tạo chữ chạy


Marquee Codes


--Marquee Codes ---- Marquee Codes ---- Marquee Codes ---- Marquee Codes ---- Marquee Codes--

Horizontal Marquee

 Marquee  đang di chuyển theo chiều ngang từ phải sang trái. Mặc dù điều này có xu hướng  mặc địnhdirection="left" . Bạn có thể thiết lập nó sang  rightup, and down .
(Chưa có time để dịch , hi!)
Source CodeDemo
<marquee behavior="scroll" direction="left">
Text tại đây
</marquee>

Text tại đây

Marquee Speed
Bạn có thể tăng tốc độ hoặc làm chậm các vùng chọn của bạn bằng cách sử dụng các thuộc tính scrollamount cùng với một giá trị số. Ở đây, chúng tôi sử dụng một số giá trị để thiết lập vùng chọn tốc độ khác nhau. 
Source CodeDemo 
<marquee behavior="scroll" direction="right" scrollamount="10">Hare</marquee>
<marquee behavior="scroll" direction="right" scrollamount="5">Tortoise</marquee>
<marquee behavior="scroll" direction="right" scrollamount="1">Snail</marquee>
HareTortoiseSnail




Images and Text
There's nothing to stop you putting more than one HTML element inside your HTML marquee codes. Doing so will make both scroll.
Source CodeDemo 
<marquee behavior="scroll" direction="left">
<div style="text-align:center;">
<img src="http://www.htmlcodes.me/images/marquees/flying_bat.gif" width="125" height="82" alt="Flying bat in a marquee" /><br />Bruce the Bat
</div>
</marquee>
Flying bat in a marquee
Bruce the Bat
Stop Marquee on Hover 


onmouseover="this.stop();"
(i.e. onmouseout="this.start();")

Source CodeResult
<marquee behavior="alternate" scrollamount="30" onmousedown="this.stop();" onmouseup="this.start();"> Go on... STOP ME! </marquee>Go on... STOP ME



Stop Marquee with Buttons


onClick="document.getElementById('mymarquee').stop();" 

onClick="document.getElementById('mymarquee').start();"




Demo
See how fast I am!

Code

<marquee behavior="scroll" direction="left" scrollamount="50" id="mymarquee">
<p>See how fast I am!</p>
</marquee>
<input type="button" value="Stop Marquee" onClick="document.getElementById('mymarquee').stop();">
<input type="button" value="Start Marquee" onClick="document.getElementById('mymarquee').start();">



with image

Demo
See how fast I am!
Stop button Start button
Code


<marquee behavior="scroll" direction="right" scrollamount="50" id="mymarquee2">
<p>See how fast I am!</p>
</marquee>
<img src="http://www.htmlcodes.me/images/marquees/stop_marquee.png" width="100" height="100" alt="Stop button" onClick="document.getElementById('mymarquee2').stop();" />
<img src="http://www.htmlcodes.me/images/marquees/start_marquee.png" width="100" height="100" alt="Start button" onClick="document.getElementById('mymarquee2').start();" />


Marquee Attributes


Danh sách thuộc tính 
widthChiều rộng của  marqueescrollamountHow far to jump as it moves
heightChiều cao của  marqueeloopHow many times it should loop
directionHướng chạy marqueebgcolorMàu nền marquee
behaviorKiểu chạy: slide, bounce, scrollhspaceSets the amount of horizontal space around the marquee
scrolldelayHow long the marquee should wait before each jumpvspaceSets the amount of vertical space around the marquee






Nguồn: HTMLcode

0 Nhận xét:

Đăng nhận xét