blob: 1cc9c4c94f14b5c7cacbb5ce2f1fd5e5187d3dba [file] [log] [blame]
<!DOCTYPE html>
<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;
transform: rotate(45deg);
will-change: transform;
}
</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 &gt; static
</div>
</div>
<div class="outer" style="position: static;">
<div class="inner" style="position: relative;">
static &gt; relative
</div>
</div>
<!-- relative container -->
<div class="outer" style="position: relative;">
<div class="inner" style="position: static;">
relative &gt; static
</div>
</div>
<div class="outer" style="position: relative;">
<div class="inner" style="position: relative;">
relative &gt; relative
</div>
</div>
<br>
<div class="outer" style="position: relative;">
<div class="inner" style="position: absolute;">
relative &gt; absolute
</div>
</div>