日期:2014-05-18 浏览次数:20153 次
以下是HTML网页特效代码,点击运行按钮可查看效果: 以下是程序代码<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Veryide.Effect.JS / VeryIDE.TabOption(); - VeryIDE Labs</title> <meta name="keywords" content="VeryIDE,实验室,Labs,VeryIDE labs,web2.0,JavaScript,CSS" /> <meta name="description" content="VeryIDE实验室 - 为您提供VeryIDE最创新、最值得期待的产品" /> <link rel="icon" href="favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> <script type="text/javascript" src="http://www.veryide.com/veryide/js/veryide.core.js"></script> <script type="text/javascript" src="http://www.veryide.com/veryide/js/veryide.library.js"></script> <script type="text/javascript" src="http://www.veryide.com/veryide/js/veryide.effect.js"></script> <style type="text/css"> <!-- /*.box*/ .box{ border:#e5e5e5 solid 1px; text-align:center; padding:5px;width:250px;float:left;margin:20px 15px;} .box strong{ color:#ca2801;font-size:14px; line-height:30px;} .box ol{ margin:5px 0; padding:0;} .box ol li{ background:#ccc; text-align:center;line-height:24px;font-weight:bold; width:50%; float:left; color:#ca2801; cursor:pointer;} .box ol li.active{ background:#666;color:#fff;} .box div{ margin:5px 0; padding:0; clear:both;} .box img{ display:block;} .box div.show{color:#fff;background-color:#333333;} .box div.hidden{color:#fff;background:#333333; position:absolute;top:360px;margin-left:35px; border:#fff solid 2px; width:80px; height:80px; overflow:hidden;} /*.box2*/ .box2{ border:#e5e5e5 solid 1px; text-align:center; padding:5px 0;width:300px;float:left;margin:20px 15px; clear:both;} .box2 strong{ color:#ca2801;font-size:14px; line-height:30px;} .box2 ol{ margin:0; padding:0;} .box2 ol li{ background:#ccc; text-align:center;line-height:24px;font-weight:bold; width:140px; float:left; color:#ca2801; cursor:pointer;margin:0 5px;margin-bottom:5px;} .box2 ol li.active{ background:#666;color:#fff;line-height:30px;margin-bottom:0;} .box2 div{padding:0; clear:both;margin:0 5px;padding:5px 0;} .box2 div.show{color:#fff;background-color:#666;display:block;margin-bottom:5px;} .box2 div.hidden{display:none;} --> </style> </head> <body> <div id="content"> <h2>第一可能无法正常运行,请刷新再看效果</h2> <div class="box"> <strong>鼠标点击切换</strong> <ol> <li id="m-1">卡片一</li> <li id="m-2">卡片二</li> </ol> <div id="u-1"> <img name="" src="http://img2.cache.netease.com/lady/2008/11/13/20081113124851a8ef3.jpg" alt="" /> </div> <div id="u-2"> <img name="" src="http://img1.cache.netease.com/lady/2008/11/12/200811121527103131e.jpg" alt="" /> </div> </div> <script type="text/javascript"> var WindowVote2 = new VeryIDE.TabOption("click");//绑定到onclick事件 WindowVote2.TabClass("active","");//tab的两个class WindowVote2.Add(document.getElementById("m-1"),document.getElementById("u-1"));//tab&box WindowVote2.Add(document.getElementById("m-2"),document.getElementById("u-2"));//tab2&box2 WindowVote2.Play(1);//默认显示第二张卡片 </script> <div class="box"> <stro