Các bạn đã từng thấy ở trong các trang web có nhiều trang có phần menu rất hay. Hôm nay đệ cũng xin phép mạo muội poss một đoạn html của phần menu :
<html> <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"> 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[lnks].style.letterSpacing = letterSpacing + "px"; timerLSM = setTimeout("LetterSpacingMenu()", nSpeed); } } function StopMenu() { if(document.getElementById) { clearTimeout(timerLSM); for(i=0;i<lnk.length;i++) lnk[i].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;
<!-- Begin
// End --> </script> </head> <body> <div id="menucont"> <!-- Put all links between <center> </center> to get those links align center for older browser --> <a href="lien ket trang" id="a1" class="menulinks">noi dung</a><br> <a href="lien ket trang" id="a2" class="menulinks">noi dung</a><br> <a href="lien ket trang" id="a3" class="menulinks">noi dung</a><br> <a href="lien ket trang" id="a4" class="menulinks">noi dung</a><br> <a href="lien ket trang" id="a5" class="menulinks">noi dung</a><br> <a href="lien ket trang" id="a6" class="menulinks">noi dung</a><br> <a href="lien ket trang" id="a7" class="menulinks">noi dung</a> </div> </body> </html>
--------------------
Nhóm bạn bè:
Xem tất cả
|