***文本特效***链接文字特效
把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件要完成此效果需要两个步骤
第一步:把如下代码加入到<head>区域中
<style type="text/css">
.menulinks {position:relative;}
#menucont a{color:#006699; font-weight:bold; text-decoration:none;}
#menucont a:hover{color:#ff0000; font-weight:bold; text-decoration:underline overline; text-transform: uppercase;}
</style>
<script language="javascript">
<!-- begin
nspace=5 // how many space maximum between each letter
nspeed=100 // the speed of the animation
timerlsm=null;
function letterspacingmenu() {
if(document.getelementbyid){
lnks = math.floor(math.random()*lnk.length);
letterspacing = math.floor(math.random()*nspace);
lnk.style.letterspacing = letterspacing + "px";
timerlsm = settimeout("letterspacingmenu()", nspeed);
}
}
function stopmenu() {
if(document.getelementbyid) {
cleartimeout(timerlsm);
for(i=0;i<lnk.length;i++)
lnk.style.letterspacing = 0 + "px";
}
}
function lsmenuinit() {
if(document.getelementbyid) {
lnk = document.getelementbyid("menucont").getelementsbytagname("a");
cnt = document.getelementbyid("menucont");
cnt.style.textalign= "center";
cnt.onmouseover=stopmenu;
cnt.onmouseout=letterspacingmenu;
letterspacingmenu();
}
}
onload=lsmenuinit;
//end -->
</script>
第二步:把如下代码加入到<body>区域中
<div id="menucont">
<a href="#" id="a1" class="menulinks" title="what's new">what's new</a><br>
<a href="#" id="a2" class="menulinks" title="about this site">about this site</a><br>
<a href="#" id="a3" class="menulinks" title="dhtml scripts">dhtml scripts</a><br>
<a href="#" id="a4" class="menulinks" title="dhtml tutorials">dhtml tutorials</a><br>
<a href="#" id="a5" class="menulinks" title="dhtml links">dhtml links</a><br>
<a href="#" id="a6" class="menulinks" title="promote this site">promote this site</a><br>
<a href="#" id="a7" class="menulinks" title="contact us">contact us</a>
</div>
--------------------------------------
http://www.huoyue.com.cn 活跃网,活跃人群的论坛,访问活跃网,将给您带来意想不到的收获,还可以免费为您开论坛,让您免费拥有与朋友、网友交流的论坛。你是年轻人吗?你活跃你就上!
页:
[1]