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这个不能改
<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
那你把two也设置个position不可以嘛? relative
就是这样!
作者: legends2012 发布时间: 2011-05-17
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28