Bạn chỉ việc đặt đoạn mã javascript dưới đây trước thẻ đóng </head>.
<script language="javascript">
<!-- Begin
function initArray() {
for (var i = 0; i < initArray.arguments.length; i++) {
this[i] = initArray.arguments[i];
}
this.length = initArray.arguments.length;
}
var colors = new initArray(
"red",
"blue",
"green",
"purple",
"black",
"tan",
"red");
delay = .5; // seconds
link = 0;
vlink = 2;
function linkDance() {
link = (link+1)%colors.length;
vlink = (vlink+1)%colors.length;
document.linkColor = colors[link];
document.vlinkColor = colors[vlink];
setTimeout("linkDance()",delay*1000);
}
linkDance();
// End -->
</script>
<!-- Begin
function initArray() {
for (var i = 0; i < initArray.arguments.length; i++) {
this[i] = initArray.arguments[i];
}
this.length = initArray.arguments.length;
}
var colors = new initArray(
"red",
"blue",
"green",
"purple",
"black",
"tan",
"red");
delay = .5; // seconds
link = 0;
vlink = 2;
function linkDance() {
link = (link+1)%colors.length;
vlink = (vlink+1)%colors.length;
document.linkColor = colors[link];
document.vlinkColor = colors[vlink];
setTimeout("linkDance()",delay*1000);
}
linkDance();
// End -->
</script>
Bạn cũng có thể thêm màu sắc cho hiệu ứng này.
Tham khảo theo Javascript.internet.com.
Unknown
16 July, 2015 10:07
timberland outlet
kate spade outlet
oklahoma city thunder jerseys
thomas sabo uk
converse shoes
kate spade outlet
hollister clothing
louis vuitton
mcm handbags
oakley sunglasses canada
true religion jeans
toms shoes outlet online
longchamp sale
ralph lauren uk
m a c cosmetics
five fingers shoes
new york giants jerseys
salomon speedcross 3
abercrombie
foamposite galaxy
mulberry outlet
burberry outlet online
ysl outlet
michael kors outlet
lebron james shoes
burberry handbags
nfl jerseys wholesale
nike trainers
oakley sunglasses wholesale
air jordan 4
oakley sunglasses wholesale
the north face jackets
christian louboutin outlet
christian louboutin shoes
nike roshe
zheng123 7.16