Here is the code to add a simple scrolling text from right to left side
The output will be like:
Example 1:
If you want some more attraction,then try these,
Add a background color to the text,
Example 2:
You can choose your background colour by replacing the hexadecimal code(#99ccff).
Click here to see the codes of the different colors.
Here are some mode attributes to learn:
direction="left"
direction="right"
direction="up"
direction="down"
The above attributes tells the text which direction to scroll.
Use the code below:
Here is are some examples:
To scroll in the 'right' direction:
Example 3:
Example 4:
To scroll in the 'up' direction:
Example 5:
Downwards:(I changed the hexa decimal codes for different colours)
few more attributes:
You can add this attribute to alternate the text
Here is the code to do this:
Example 6:
You can also set the speed of the text with this simple attribute:
The lower the scrollamount value, the less the speed it moves,
the html code for this:
example 7:(for scrollamout =2)
Example 8:(for scrollamount=5)
Pausing the text when mouse is over the text:It is very useful when the reader wants to read the text,and the scrollamount is big,sothat he will put the mouse over the text to pause the text and read the matter:
Here is the code to do this
Example 9:
(place the mouse over the text to test it)
Changing the text colour:
Here is the code to change the text colour:(Add it before the marquee tag)
So, the code looks like this
Example 10:
Here is the important one and most useful one, adding hyperlinks in the scrolling text.
Hyperlink means a link when clicked go to another location(site).
Let's see how to add hyperlinks to the scrolling text:
Adding hyperlinks(open in the same window):
Here is the sample code:
NOTE:Replace the Link#1,Link#2,Link#3 with the text and url#1,url#2 and url#3 with the target url addresses.
Here is an example:
The output will look like this
<>
If you want to open the links in new window,here is the code:
That's it!Now you can add this to your blogger sidebar,in the blog post,where ever you want.
If you want to put this in sidebar,then sign in to your blogger account>click the add a page element> and paste the code in html/javascript and save the changes .This is shown in the below pictures.
Next,
Sabtu, 14 Januari 2012
buat srolling text bergerak
Tidak ada komentar:
Posting Komentar
Langganan:
Posting Komentar (Atom)