我想实现几张图片随不同坐标显示的效果~ 我想在整个网页上的不同坐标一个一个显示图片.类似JS幻灯..然后就事不同地点显示...谁帮帮我~~~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 就是一张大背景图上不同点显示小图片..A.B.C.D 四个点~ B显示A消失,C显示B消失.....逐个循环显示 是要这个效果?<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html> <head> <title> New Document </title> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <style type="text/css"> .div{ background: #aabbcc; width: 500px; height: 500px; } .div div{ height:50px; width: 50px; position: absolute; display: none; } .divA{ top:50px; left: 50px; background: red; } .divB{ top: 400px; left: 100px; background: blue; } .divC{ top: 150px; left: 300px; background: yellow; } .divD{ top: 200px; left: 150px; background: green; } </style> </head> <body> <div id="divMain" class="div"> <div class="divA">A</div> <div class="divB">B</div> <div class="divC">C</div> <div class="divD">D</div> </div> <script type="text/javascript"> var divs=document.getElementById("divMain").getElementsByTagName("div"); var showIndex = 0;//当前显示的序列 function show(){ divs[showIndex].style.display = "block"; divs[showIndex-1 < 0 ? divs.length-1 : showIndex - 1].style.display = "none"; if(showIndex < divs.length-1){ showIndex ++; } else{ showIndex = 0; } setTimeout("show()", 1000); } show(); </script> </body></html> 谢谢就这个样式了~我修改下就好了~thanks!~~~ 求教如何获取textarea中光标相对于浏览器窗口或者body元素的x,y坐标.或者求教如何让下拉列表根据或者跟随textarea中光标的位置出现或者移动 请问JS里如何获取<input type="file">里的文本路径 EXT4.0模型定义,和数据加载,以及Grid数据绑定的一个小问题,求帮助 用JSP书写树型论坛代码有人懂吗 关于对xml的操作异步、同步的问题 正则表达式,不匹配括号里面的字符 求CSDN左边树形菜单,小弟菜...请详解 请问这样的功能怎样实现 在线!! 如何在本页面隐藏工具栏,菜单栏等. 请教如何控制GIF动画的帧? 求个正则表达式 关于javascript的理解
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<style type="text/css">
.div{
background: #aabbcc;
width: 500px;
height: 500px;
}
.div div{
height:50px;
width: 50px;
position: absolute;
display: none;
}
.divA{
top:50px;
left: 50px;
background: red;
} .divB{
top: 400px;
left: 100px;
background: blue;
}
.divC{
top: 150px;
left: 300px;
background: yellow;
} .divD{
top: 200px;
left: 150px;
background: green;
}
</style>
</head> <body>
<div id="divMain" class="div">
<div class="divA">A</div>
<div class="divB">B</div>
<div class="divC">C</div>
<div class="divD">D</div>
</div>
<script type="text/javascript">
var divs=document.getElementById("divMain").getElementsByTagName("div");
var showIndex = 0;//当前显示的序列 function show(){
divs[showIndex].style.display = "block";
divs[showIndex-1 < 0 ? divs.length-1 : showIndex - 1].style.display = "none";
if(showIndex < divs.length-1){
showIndex ++;
}
else{
showIndex = 0;
}
setTimeout("show()", 1000);
}
show();
</script>
</body>
</html>