+ -
当前位置:首页 → 问答吧 → IE中position如何在relative之上?

IE中position如何在relative之上?

时间:2011-05-17

来源:互联网

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
div {
width: 200px;
height: 200px;
}
#one {
background-color: red;
position: relative ;
}
#two {
background-color: #254786;
}
#three {
top: 100px;
background-color: green;
position: absolute;
}
</style>
</head>
<body>
<div id="one">one
<div id="three">three
</div>
</div>
<div id="two">two
</div>
<body>
</html>
这样子,three会遮住one 和 two ,我想让two 遮住one 和 three,这需要怎么改呢,注:one的position为relative 和three的position为absolute这个不能改

作者: xmtestclog   发布时间: 2011-05-17

那你把two也设置个position不可以嘛? relative

作者: liujian650107   发布时间: 2011-05-17

引用 1 楼 liujian650107 的回复:
那你把two也设置个position不可以嘛? relative

就是这样!

作者: legends2012   发布时间: 2011-05-17