注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

浩瀚星云

上善若水 厚德载物<学习版>

 
 
 

日志

 
 

能移动的超级连接特效(比较酷)  

2008-05-02 18:15:04|  分类: ASP(过时) |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>网页特效|Linkweb.cn/Js|---能移动的超级连接特效(比较酷)</title>

</head>
<body>
<style>
.fly {color:336c6c;font-family:arial;font-size:24px;position:absolute;
visibility:hidden;z-index:2;}
.logo {font-family: times;font-size:48px;color:blue;
position:absolute;top:0px;left:70px;
visibility:visible;z-index:1;}
.desc {text-align: center;font-family:楷体_GB2312;
font-size:18px;color: #336c6c;position:absolute;top:220px;
left: 140px;width:400px;visibility:hidden;
z-index:0;}
BODY {background:#c0c0c0;}
A {color:lime;}
A:HOVER {color : yellow;}
</style>
<script LANGUAGE="JavaScript">
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
function showObject(obj) {
if (ns4) obj.visibility = "show"
else if (ie4) obj.visibility = "visible"
}
function hideObject(obj) {
if (ns4) obj.visibility = "hide"
else if (ie4) obj.visibility = "hidden"
}
function slideLogo(from, to) {
if (from < to) {
company.top = (from += 10);
setTimeout('slideLogo(' + from + ',' + to + ')', 20);
}
else initObjects();
}
function rotateObjects() {
for (var i = 0; i < pos.length; i++) {
pos[i] += inc; objects[i].visibility = 'visible';
objects[i].left = (r * Math.cos(pos[i])) + xoff
}
rotateTimer = setTimeout("rotateObjects()", 50);
}
function initObjects() {
objects = new Array(fly1, fly2, fly3, fly4);
pos = new Array();
pos[0] = 0;
for (var i = 1; i < objects.length; i++) {
pos[i] = parseFloat(pos[i - 1] + ((2 * pi) / objects.length));
}
rotateObjects();
}
/* Variables for rotating objects */
var objects;
var pos;
var r = 160;        // radius
var xoff = 280;     // x offset
var yoff = 170;     // y offset
var pi = Math.PI;   // get pi
var inc = pi / 180; // degrees per rotation cycle
var objects;        // objects to be rotated
var pos;            // position for objects
</script>
 <body BGCOLOR="#c0c0c0" link="green" TEXT="black">
<div ID="fly1" CLASS="fly"><a HREF="#" onMouseOver="showObject(desc1)"
onMouseOut="hideObject(desc1)">
<p>Item 1</a><br></p>
</div><div ID="fly2" CLASS="fly"><a HREF="#" onMouseOver="showObject(desc2)"
onMouseOut="hideObject(desc2)">
<p>Item 2</a><br></p>
</div><div ID="fly3" CLASS="fly"><a HREF="#" onMouseOver="showObject(desc3)"
onMouseOut="hideObject(desc3)">
<p>Item 3</a><br></p>
</div><div ID="fly4" CLASS="fly"><a HREF="#" onMouseOver="showObject(desc4)"
onMouseOut="hideObject(desc4)">
<p>Item 4</a><br></p>
</div><div ID="company" CLASS="logo">
<p><small>WELCOME TO DREAM WORKROOM</small></p>
</div><div ID="desc1" CLASS="desc">
<p>Item 1的内容 </p>
</div><div ID="desc2" CLASS="desc">

<p>Item 2的内容 </p>
</div><div ID="desc3" CLASS="desc">
<p>Item 3的内容 </p>
</div><div ID="desc4" CLASS="desc">
<p>Item 4的内容 </p>
</div><script LANGUAGE="JavaScript">
/* Simple version detection */
var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >=
4);/* They can be used in placeof hidden and visible because on occasion Navigator
 has problems with the two */
var HIDDEN = (isNS) ? 'hide' : 'hidden';
var VISIBLE = (isNS) ? 'show' : 'visible';
/* Create shortcut variables for different absolutely positioned elements */
var fly1 = (isNS) ? document.fly1 : document.all.fly1.style;
var fly2 = (isNS) ? document.fly2 : document.all.fly2.style;
var fly3 = (isNS) ? document.fly3 : document.all.fly3.style;
var fly4 = (isNS) ? document.fly4 : document.all.fly4.style;
var company = (isNS) ? document.company : document.all.company.style;
var desc1 = (isNS) ? document.desc1 : document.all.desc1.style;
var desc2 = (isNS) ? document.desc2 : document.all.desc2.style;
var desc3 = (isNS) ? document.desc3 : document.all.desc3.style;
var desc4 = (isNS) ? document.desc4 : document.all.desc4.style;
 /* Begin the sliding of the company logo */
slideLogo(0, 140);
</script>

</body>
</html>

  评论这张
 
阅读(39)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017