Last Update:2017-08-24
Source: Internet
Author: User
Keywords
Web page production
Ajax
javascript
<html> <head> <meta http-equiv= "Content-type" content= "HTML; charset=gb2312 "/> <title> effect resembles flash css+div+js menu </title> <style> body{ Background-color: #B8B8A0; } #fbtn { Display:none; Overflow:hidden; Border-style:solid; border-width:1px; Border-color: #e1e1c9 #e1e1c9 #6e6e56 #6e6e56; Padding:1 1 1 1; width:115px; height:30px; } #fbtn_txt { position:relative; } #fbtn_txt div{ height:30px; padding-top:11px; font-size:9px; Font-family:small fonts; Color: #800080; Text-align:center; Cursor:hand; } #fbtn_mask { Background-color: #ffffff; position:relative; width:100%; height:100%; } </style>
</head>
<body> <div id=fbtn> <div id=fbtn_mask></div> <div id=fbtn_txt <div>g1</div> <div>good morning</div> </div> </div> <div id=fbtn> <div id=fbtn_mask></div> <div id=fbtn_txt <div>g2</div> <div>good evening</div> </div> </div> <div id=fbtn> <div id=fbtn_mask></div> <div id=fbtn_txt <div>m1</div> <div>my name is Fireyy</div> </div> </div> <div id=fbtn> <div id=fbtn_mask></div> <div Id=fbtn_ Txt> <div>m2</div> <div>mm mm I love u</div> </div> </div> <div id=fbtn> <div id=fbtn_mask></div> <div id=fbtn_txt> <div>g1</div> <div>good morning</div </div> </div> <div id=fbtn> <div id=fbtn_mask></div> <div id=fbtn_txt> <div>g2</div> <div>good evening</div </div> </div> <div id=fbtn> <div id=fbtn_mask></div> <div id=fbtn_txt> <div>m1</div> <div>my name is Fireyy</div </div> </div> <div id=fbtn> <div id=fbtn_mask></div> <div id=fbtn_txt> <div>m2</div> <div>mm mm I love u</div> </div> </div>
<script> var current=null var t=null; for (Var i=0;i<fbtn.length;i++) { fbtn_txt[i]. style.postop=-30; fbtn_mask[i].style.posTop=-30; fbtn[i].index=i; fbtn[i].style.display= "Block"; fbtn[i].onmouseover=function () { if (!current) { current=this; domove ( This.index); } else if (current!=this) { domove (current.index); domove (This.index); current =this; } } fbtn[i].onmouseout=function () { if (event.toelement==this.parentelement&t==this) { domove (This.index); current=null; } } } function Domove (num) { var o=fbtn_txt[num]; var m=fbtn_mask[num]; if (o.style.postop <-60) { o.style.display= ' none '; var t=o.children[1].innerhtml; o.children[1]. innerhtml=o.children[0].innerhtml; o.children[0].innerhtml=t; o.style.posTop=-30; o.style.display= "Block"; if (m.style.postop>30) m.style.postop=-30 else m.style.postop=0; &NBSP} else{ m.style.postop+=3 o.style.postop-=3; settimeout (' Domove (' + num+ ') ', 15); } } </script> </body> </html>