返回列表

position:absolute;在IE8,7有兼容性问题

默认分类 2014/11/04 19:16

position:absolute;在IE8,7有兼容性问题. 演示地址: http://haiyang.me/demo/position.html,http://haiyang.me/demo/position2.html

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>position:absolute在IE下的兼容性问题</title>
<style>
html,body {font-family: Consolas;padding:0px;margin:0px;}
.b{float: left; border: 1px solid green;}
.c{
     border: 1px solid blue;
    position:absolute;
    /*display:inline /*不写则IE8下会跑到.b前面!!*/
}
</style>
</head>
<body>
<div class="a">
    <div class="b">OOOOOOOOOOOOOOOOOO</div>
    <div class="c">||||||</div>
</div>
</body>
</html>