中文(简体)
<样式> .fly {颜色:336c6c;字体系列:arial;字体大小:24px;位置:绝对;可见性:隐藏;z-index:2;} .logo {字体系列:次;字体大小:48px;颜色:蓝色;位置:绝对;顶部:0px;左侧:70px;可见性:可见;z-index:1;} .desc {text-align: center;font-family:楷体_GB2312;字体大小:18px;颜色:#336c6c;位置:绝对;顶部:220px;左:140px;宽度:400px;可见性:隐藏; 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 = "显示" else if (ie4) obj.visibility = "visible" } function hideObject(obj) { if (ns4) obj.visibility = "隐藏" else if (ie4) obj.visibility = "hidden" } function slipLogo(from, to) { if (from < to) { company.top = (from += 10); } setTimeout('slideLogo(' + from + ',' + to + ')', 20); } 否则 initObjects(); } functionrotateObjects() { for (var i = 0; i < pos.length; i++) { pos[i] += inc; }对象[i].visibility = '可见';对象[i].left = (r * Math.cos(pos[i])) + xoff }rotateTimer = setTimeout("rotateObjects()", 50); } 函数 initObjects() { 对象 = new Array(fly1,fly2,fly3,fly4); pos = 新数组();位置[0] = 0; for (var i = 1; i <objects.length; i++) { pos[i] = parseFloat(pos[i - 1] + ((2 * pi) /objects.length)); } 旋转对象(); } /* 旋转对象的变量 */ var objects; var 位置; var r = 160; // 半径 var xoff = 280; // x 偏移 var yoff = 170; // y 偏移 var pi = Math.PI; // 获取 pi var inc = pi / 180; // 每旋转周期度数 var 对象; // 要旋转的对象 var pos; // 对象的位置 </script> <body BGCOLOR="#c0c0c0" link="green" TEXT="black"> <div ID="fly1" CLASS="fly"><a HREF="#" onMouseOver= "showObject(desc1)" onMouseOut="hideObject(desc1)"> <p>项目 1</a><br></p> </div><div ID="fly2" CLASS="fly"><a HREF="#" onMouseOver="showObject(desc2)" onMouseOut="hideObject(desc2)"> <p>项目 2</a><br></p> </div><div ID="fly3" 类别="fly"><a HREF="#" onMouseOver="showObject(desc3)" onMouseOut="hideObject(desc3)"> <p>项目 3</a><br></p> </div>< div ID="fly4" CLASS="fly"><a HREF="#" onMouseOver="showObject(desc4)" onMouseOut="hideObject(desc4)"> <p>项目 4</a><br></ p> </div><div ID="company" CLASS="logo"> <p><small>欢迎来到梦想工作室</small></p> </div><div ID="desc1" CLASS= "desc"> <p>第 1 项的内容 </p> </div><div ID="desc2" CLASS="desc"> <p>第 2 项的内容 </p> </div><div ID ="desc3" CLASS="desc"> <p>第 3 项的内容 </p> </div><div ID="desc4" CLASS="desc"> <p>第 4 项的内容 </p> < /div><script LANGUAGE="JavaScript"> /* 简单版本检测 */ var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);/* 它们可以用来代替隐藏和可见,因为有时导航器会出现两个问题 */ var HIDDEN = (isNS) ? '隐藏' : '隐藏'; var 可见 = (isNS) ? '显示' : '可见'; /* 为不同的绝对定位元素创建快捷变量 */ 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 公司 = (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; /* 开始公司标志的滑动 */ slipLogo(0, 140); </脚本>