+ -
当前位置:首页 → 问答吧 → 怎么按顺序排下来,又遮到右边~~~~~

怎么按顺序排下来,又遮到右边~~~~~

时间:2011-09-25

来源:互联网

<!--怎么按顺序排下来,又遮到右边-->
<div style="position:absolute; top:0; left:0; width:400px; background-color:#FF0000; z-index: 999;">ss</div>
<div style="position:absolute; top:0; left:0; width:400px; background-color:#FFFF00; z-index: 999;">ss</div>
<div style="position:absolute; top:0; left:0; width:400px; background-color:#FF0000; z-index: 999;">ss</div>
<div style="position:absolute; top:0; left:0; width:400px; background-color:#FFFF00; z-index: 999;">ss</div>
<!--怎么按顺序排下来,又遮到右边-->
<!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> </head> <body> <div style="width:800px; height:500px; margin:0 auto"> <div style="float:left; position:relative; width:200px; height:50px; background-color:#00FF66;"> <!--怎么按顺序排下来,又遮到右边--> <div style="position:absolute; top:0; left:0; width:400px; background-color:#FF0000; z-index: 999;">ss</div> <div style="position:absolute; top:0; left:0; width:400px; background-color:#FFFF00; z-index: 999;">ss</div> <div style="position:absolute; top:0; left:0; width:400px; background-color:#FF0000; z-index: 999;">ss</div> <div style="position:absolute; top:0; left:0; width:400px; background-color:#FFFF00; z-index: 999;">ss</div> <!--怎么按顺序排下来,又遮到右边--> </div> <div style="float:right; position:relative; width:580px; height:100px; background-color:#00FF66;"></div> </div> </body> </html>
 提示:您可以先修改部分代码再运行

作者: xiaoc3   发布时间: 2011-09-25

是这个意思吗?
<!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> </head> <body> <div style="width:800px; height:500px; margin:0 auto"> <div style="float:left; position:relative; width:200px; height:50px; background-color:#00FF66;"> <!--怎么按顺序排下来,又遮到右边--> <div style="position:absolute; top:0; left:0; width:400px;height:50px; background-color:#FF0000; z-index: 999;">ss</div> <div style="position:absolute; top:50px; left:0; width:400px;height:50px; background-color:#FFFF00; z-index: 999;">ss</div> <div style="position:absolute; top:100px; left:0; width:400px; height:50px;background-color:#FF0000; z-index: 999;">ss</div> <div style="position:absolute; top:150px; left:0; width:400px;height:50px; background-color:#FFFF00; z-index: 999;">ss</div> <!--怎么按顺序排下来,又遮到右边--> </div> <div style="float:right; position:relative; width:580px; height:100px; background-color:#00FF66;"></div> </div> </body> </html>
 提示:您可以先修改部分代码再运行
[ 本帖最后由 cycc0114 于 2011-9-26 10:33 编辑 ]

作者: cycc0114   发布时间: 2011-09-26

相关阅读 更多

热门下载

更多