Javascript: a menu that imitates Flash and achieves dynamic and elastic beating. Javascript tutorial
You can copy the style and content from the past for your use.
<Html> <pead> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "/> <title> imitating the AS effect navigation menu </title> <style type =" text/css "> <! -- A: link, a: visited {text-decoration: none; color: #666666} a: hover {text-decoration: underline} # hor1 {position: absolute; left: 320px; top: 20px; width: 220px; height: 20px; z-index: 1; background-color: #999900 ;}# hor2 {position: absolute; left: 320px; top: 40px; width: 220px; height: 20px; z-index: 2; background-color: # FFCC00 ;}# hor3 {position: absolute; left: 320px; top: 60px; width: 220px; height: 20px; z- Index: 3; background-color: #99CC00;} # board1 {position: absolute; left: 320px; top: 40px; width: 220px; height: 120px; z-index: -100; background-color: #333333; visibility: hidden;} body, td, th {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: # FFFFFF; font-weight: bold;} body {background-color: #666666 ;}# board2 {position: absolute; left: 320px; top: 60px; width: 220pixels; height: 120 Px; z-index:-90; background-color: #333333; visibility: hidden;} # board3 {position: absolute; width: 220px; height: 120px; z-index: -80; left: 320px; top: 80px; background-color: #333333; visibility: hidden; }# hor4 {position: absolute; left: 320px; top: 80px; width: 220px; height: 20px; z-index: 4; background-color: #99 CCCC;} # board4 {position: absolute; left: 320px; top: 100px; width: 220px; height: 120px; z-in Dex:-70; background-color: #333333; visibility: hidden ;} --> </style> <script type = "text/javascript"> lastNo = 0 function re (menu_no) {if (lastNo! = Menu_no) {cur = menu_no + 1 lastNo = menu_norest ()} else {cur = 100} document. getElementById ("board" + menu_no ). style. visibility = "visible"} function rest () {for (I = 1; I <= 4; I ++) {document. getElementById ("hor" + I ). style. top = 20 * I; document. getElementById ("board" + I ). style. visibility = "hidden"} menu_num = 4; act = 1 height = 120 + 20 speed = 0; posY = 0;} function huke () {if (act = 1 & cur <100) {speed = (height-posY) * 0.69 + speed * 0.6 posY + = speedfor (I = cur; I <= menu_num; I ++) {document. getElementById ("hor" + I ). style. top = posY + (I-2) * 20} if (Math. abs (height-posY) <0.5) {for (I = cur; I <= menu_num; I ++) {document. getElementById ("hor" + I ). style. top = height + (I-2) * 20} act = 0} setTimeout ("huke ()", 50 )}} script </pead> <body> focus on the latest website creation and promotion 1. an excuse for Baidu to tamper with search results from the SEO perspective <br/> 2. WEB standardization: Use DIV + CSS for Webpage Design 1. use CSS to implement the color gradient of the background of the table <br/> 2. common webpage availability error-form component error <br/> 3. CSS style sheet: is the link good or embedded? <Dl> <dt> · use CSS to implement the color gradient of the background of a table </dt> </dl> <dt>-common webpage availability error-form component error </ dt> </dl> <dt> · CSS style sheet: is the link good or embedded? </Dt> </dl> <dt> · common webpage availability errors-copywriting errors </dt> </dl> <dt> · about web registration page availability analysis </dt> </dl> <dt> · use CSS to achieve gradient of background color of a table </dt> </dl> <dt> · common webpage availability errors-form component errors </dt> </dl> <dt> · CSS style sheet: is the link good or embedded? </Dt> </dl> <dt> · common webpage availability errors-copywriting errors </dt> </dl> <dt> · about web registration page availability analysis </dt> </dl> <dt> · use ASP and SQL to implement Web-based event calendar </dt> </dl> </body> </ptml>
Run code Copy code Save code