2022-07-30 14:12:12 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8"/>
|
2022-08-10 17:26:19 +00:00
|
|
|
<title>CSS Clip Test Page</title>
|
2022-07-30 14:12:12 +00:00
|
|
|
<style>
|
2022-08-10 17:26:19 +00:00
|
|
|
.box {
|
|
|
|
height: 100px;
|
|
|
|
width: 100px;
|
|
|
|
position: absolute;
|
|
|
|
background-color: aquamarine;
|
|
|
|
}
|
|
|
|
|
|
|
|
.separate-tests {
|
|
|
|
height: 125px;
|
|
|
|
border-width: 0px;
|
|
|
|
}
|
2022-07-30 14:12:12 +00:00
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
2022-08-10 17:26:19 +00:00
|
|
|
<h2>This is a normal rect with auto clipping</h2>
|
|
|
|
<div class="separate-tests">
|
|
|
|
<div class="box" style="clip: rect(auto, auto, auto, auto);"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h2>This is a div with the left side clipped out</h2>
|
|
|
|
<div class="separate-tests">
|
|
|
|
<div class="box" style="clip: rect(auto, auto, auto, 50px);"></div>
|
|
|
|
</div>
|
2022-07-30 14:12:12 +00:00
|
|
|
|
2022-08-10 17:26:19 +00:00
|
|
|
<h2>One can create a rect with or without commas and the clip works</h2>
|
|
|
|
<div class="separate-tests">
|
|
|
|
<div class="box" style="clip: rect(4em auto auto auto);"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h2>Text and borders are clipped too</h2>
|
|
|
|
<div class="separate-tests">
|
|
|
|
<div class="box" style="clip: rect(-5px auto auto 50px); border: 2px solid black;">
|
|
|
|
Lots of text Lots of text
|
|
|
|
Lots of text Lots of text
|
|
|
|
Lots of text Lots of text
|
|
|
|
Lots of text Lots of text
|
|
|
|
Lots of text Lots of text
|
2022-07-30 14:12:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-08-10 17:26:19 +00:00
|
|
|
<h2>:yakgone:</h2>
|
|
|
|
<div class="separate-tests">
|
|
|
|
<div class="box" style="clip: rect(0px 0px 0px 0px); border: 2px solid black;">
|
|
|
|
Lots of text Lots of text
|
|
|
|
Lots of text Lots of text
|
|
|
|
Lots of text Lots of text
|
|
|
|
Lots of text Lots of text
|
|
|
|
Lots of text Lots of text
|
|
|
|
</div>
|
2022-07-30 14:12:12 +00:00
|
|
|
</div>
|
|
|
|
</body>
|