blob: 599e5fe3ac4e0d8d7d597acf80bd74b32f6b65c6 (
plain)
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
46
47
48
49
50
51
52
53
54
|
<head>
<style>
.outer {
border: 10px solid black;
border-radius: 100px;
overflow: hidden;
width: 200px;
height: 100px;
margin: 10px;
display: inline-block
}
.inner {
background: #808080;
width: 100%;
height: 100%;
color: #FFFFFF;
}
</style>
</head>
<body>
The white text and grey backgrounds should all clip to the border-radius.
<br>
<!-- static container -->
<div class="outer" style="position: static;">
<div class="inner" style="position: static;">
static > static
</div>
</div>
<div class="outer" style="position: static;">
<div class="inner" style="position: relative;">
static > relative
</div>
</div>
<!-- relative container -->
<div class="outer" style="position: relative;">
<div class="inner" style="position: static;">
relative > static
</div>
</div>
<div class="outer" style="position: relative;">
<div class="inner" style="position: relative;">
relative > relative
</div>
</div>
<br>
<div class="outer" style="position: relative;">
<div class="inner" style="position: absolute;">
relative > absolute
</div>
</div>
|