<!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">
<style type="text/css">
.img-area{width:960px;height:400px;margin:0 auto}
.point{position:relative}
.point img{position:absolute;height:350px;border:1px silver solid;left:0;top:0;}
</style>
<script>
var w=350; //图片宽度
var h=350; //图片高度
var pn=5; //图片数量
var r=400; //圆圈半径
var x=400; //圆心绝对位置x
var y=100; //圆心绝对位置y
var dv=0.005; //旋转速度
var rh=80; //垂直距离
var pi=3.1415926575,d=pi/2,pd=Math.asin(w/2/r),ed=pi*2/pn,smove=true
window.onload=function(){
var o=document.getElementById("imground");
var arrimg=o.getElementsByTagName("img");
for (n=0;n<arrimg.length;n++){
arrimg[n].onmouseout=function(){smove=true;}
arrimg[n].onmouseover=function(){smove=false;}
arrimg[n].onmousedown=function(){dv=-dv}
}
setInterval(roundMove,20);
}
function roundMove(){
for (n=1;n<=pn;n++){
var o=document.getElementById("p"+n)
var ta=Math.sin(d+ed*n),strFilter;
if (ta<0) o.style.left=Math.cos(d+ed*n-pd)*r+x;
else o.style.left=Math.cos(d+ed*n+pd)*r+x;
o.style.top=ta*rh+rh+y;
o.style.width=Math.abs(Math.cos(d+ed*n+pd)-Math.cos(d+ed*n-pd))*r;
if (ta<0) {ta=(ta+1)*80+20;o.style.zIndex=0;}
else {ta=100;o.style.zIndex=1}
if (o.style.zIndex<=0) strFilter="FlipH(enabled:true)"
else strFilter="FlipH(enabled:false)";
strFilter=strFilter+" alpha(opacity="+ta+")";
o.style.opacity=ta/100;
o.style.filter=strFilter;
}
if (smove) d=d+dv;
}
</script>
<div class="img-area">
<div id="imground" class="point">
<a href="#one"><img id="p1" src="http://static.blueidea.com/static/image/common/logo.gif"/></a>
<a href="#two"><img id="p2" src="http://static.blueidea.com/static/image/common/logo.gif"/></a>
<a href="#three"><img id="p3" src="http://static.blueidea.com/static/image/common/logo.gif"/></a>
<a href="#four"><img id="p4" src="http://static.blueidea.com/static/image/common/logo.gif"/></a>
<a href="#five"><img id="p5" src="http://static.blueidea.com/static/image/common/logo.gif"/></a>
</div>
</div>
<div id="one" style="margin-top:500px;background:#ff0000;height:200px;">1</div>
<div id="two" style="margin-top:500px;background:#ff0000;height:200px;">2</div>
<div id="three" style="margin-top:500px;background:#ff0000;height:200px;">3</div>
<div id="four" style="margin-top:500px;background:#ff0000;height:200px;">4</div>
<div id="five" style="margin-top:500px;background:#ff0000;height:200px;">5</div>
</body>
</html>去掉 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
头部这两行就没问题,奇怪。
解决方案 »
- 问一个最基本的正则表达式?
- firefox下不能执行iframe里js对象的函数
- JS实现插入记录到数据库
- div
- 怎么样判断函数执行的时间
- 在javaScript中有什么函数可以把数组的值转变为变量
- 怎样判断textarea中敲入了回车键
- 我想打出分号。请问如何实现。如:alert (""");应怎样编了。
- 用Java Applet 进行Web编程时,如何限制输入域中可输入字符的长度!解决后马上给分!!!
- 这问题不难吧
- 找到国人开发的,基于extjs以及extjs的开源电子商务系统
- 严重: Servlet.service() for servlet [jsp] in context with path [/mybbs] threw exce
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">如果是ie或360或搜狗之类的就显示。定义函数如下:function browser(info)
info=request.servervariables("http_user_agent")
if instr(info,"Firefox")>0 then
response.write ""
elseif instr(info,"Chrome")>0 then
response.write ""
else
response.write "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">" & vbCrLf
response.write "<html xmlns=""http://www.w3.org/1999/xhtml"">"
end if
end function
在代码中将:
<!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">替换为函数的调用 :<% call browser(info)%>
这样问题就解决了。