在写一个幻灯片 但遇到问题
我设的外框 宽 高 都为 300 图片 也是300 但我想让几张图片都重叠到 一起 用css 还是 JavaScript 那个好些?
我设的外框 宽 高 都为 300 图片 也是300 但我想让几张图片都重叠到 一起 用css 还是 JavaScript 那个好些?
解决方案 »
- Ext htmlEditor 如何获取选中的值?
- JS文件被别人写入病毒!
- 梅花雪控件改成用户控件
- windows下javascript怎么和其他进程通讯阿?
- 请问:带有图片的计数器是如何制作的
- 一个div处于编辑状态即contentEditable=true,我怎样捕获该DIV中的控件被选中的事件?
- 我要判断一个字符串必须是这里面的几个,怎么判断呢?
- 各位,能否介绍几个免费空间的网址。
- 怎么让iframe的宽和高适应于iframe里的内容的宽和高?
- js调用swf里面的方法 "对象不支持“CallFunction”属性或方法"
- jquery插件的问题
- jquery 超级select插件 v3.2.0.0版本 支持汉字、头写拼音、英文快速定位查询的超级select插件。可方向键、tab 键快速选择.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
.draw{
position:absolute;
width:300px;
height:300px;
left:100px;
top:100px;
background-color:#000;
}
#div1{
z-index:1;
}
#div2{
z-index:2;
}
#div3{
z-index:3;
}
#div4{
z-index:4;
}
</style>
<script type="text/javascript">
</script> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
</head>
<body>
<div class="draw" id="div1">111
</div>
<div class="draw" id="div2">222
</div>
<div class="draw" id="div3">333
</div>
<div class="draw" id="div4">444
</div>
</body>
</html>
<html>
<head>
<title>幻灯片</title>
<style type="text/css">
#main{border:3px solid #000; width:300px; height:300px;}
#div_pic img{ width:300px; height:300px;}
</style>
</head>是absolute;不是absolation
<body>
<!--外框-->
<div id="main">
<!--图片层-->
<div id="div_pic">
<span style="position: absolute; z-index:1"><img src="01.jpg"/></span>
<span style="position: absolute; z-index:2"><img src="02.jpg"/></span>
<span style="position: absolute; z-index:3"><img src="03.jpg"/></span>
<span style="position: absolute; z-index:4"><img src="04.jpg"/></span>
</div>
</div>
<!--
<script type="text/javascript">
</script>
-->
</body>
</html>
<head>
<title>幻灯片</title>
<style type="text/css">
#main{border:3px solid #000; width:300px; height:300px;}
#div_pic img{ width:300px; height:300px;}
</style>
</head>是absolute;不是absolation
<body>
<!--外框-->
<div id="main">
<!--图片层-->
<div id="div_pic">
<span style="position: absolute; z-index:1"><img src="01.jpg"/></span>
<span style="position: absolute; z-index:2"><img src="02.jpg"/></span>
<span style="position: absolute; z-index:3"><img src="03.jpg"/></span>
<span style="position: absolute; z-index:4"><img src="04.jpg"/></span>
</div>
</div>
<!--
<script type="text/javascript">
</script>
-->
</body>
</html>
呵呵。你发的那个帖子里面的absolute;不是absolation写错啦
当然不行啦