forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparent-overflow.html
45 lines (40 loc) · 950 Bytes
/
parent-overflow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Overflow Test</title>
<style type="text/css" media="screen">
.container {
display: inline-block;
margin: 20px;
width: 100px;
height: 100px;
padding: 10px;
border: 1px solid black;
overflow: hidden;
}
.box {
width: 100px;
height: 300px;
background-color: gray;
-webkit-transform: translateZ(0);
}
</style>
</head>
<body>
<p>Gray box should be clipped by black border in each case.</p>
<div class="container">
<div class="box">
</div>
</div>
<div class="container" style="position: relative">
<div class="box">
</div>
</div>
<div class="container" style="position: relative; z-index: 0">
<div class="box">
</div>
</div>
</body>
</html>