下面是验证绝对定位导致父元素overflow:hidden失效的例子:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.bg{
width: 100px;
height: 100px;
border: 1px solid blue;
overflow: hidden;
}
.tu1{
width: 50px;
height: 50px;
background-color: #9cf;
position: absolute;
top: 150px;
}
.tu2{
width: 50px;
height: 50px;
background-color: #9cf;
position: relative;
top: 150px;
left: 100px;
}
</style>
</head>
<body>
<div>
<div>图一</div>
<div>图二<