serenity/Base/res/html/misc/box-shadow.html
MacDue f807fe6f6c Base: Add box-shadow + border-radius HTML examples
This now also shows the same box-shadows on the right on top of a
background to test the clipping underneath the content.
2022-06-23 19:13:24 +01:00

81 lines
2.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Box-Shadow</title>
<style>
.box {
border: 1px solid black;
height: 100px;
width: 100px;
margin: 50px;
}
#no-bg {
width: 50%;
float: left;
}
#with-bg {
width: 50%;
float: right;
background-image: url("car.png");
color: rgb(255, 255, 255);
}
.cmy {
box-shadow: 20px 10px 5px magenta, cyan -20px -10px 5px, yellow 10px -5px 5px 20px;
}
</style>
</head>
<body>
<div id="mask"></div>
<h1>Box-shadow Tests</h1>
<div id="no-bg">
<h2>Border radius 50%</h2>
<div class="box cmy" style="border-radius: 50%;">
<p>box-shadow: 20px 10px 5px magenta, cyan -20px -10px 5px, yellow 10px -5px 5px 20px</p>
</div>
<h2>Border radius: Egg</h2>
<div class="box cmy" style="border-radius: 80% 15% 55% 50% / 55% 15% 80% 50%;">
<p>box-shadow: 20px 10px 5px magenta, cyan -20px -10px 5px, yellow 10px -5px 5px 20px</p>
</div>
<br>
<h2>Border radius 20px</h2>
<div class="box cmy" style="border-radius: 20px;">
<p>box-shadow: 20px 10px 5px magenta, cyan -20px -10px 5px, yellow 10px -5px 5px 20px</p>
</div>
<br>
<div class="box" style="box-shadow: magenta -40px -20px; border-radius: 30%;">
<p>box-shadow: magenta -40px -20px</p>
</div>
<br>
<h2>No border radius</h2>
<div class="box cmy">
<p>box-shadow: 20px 10px 5px magenta, cyan -20px -10px 5px, yellow 10px -5px 5px 20px</p>
</div>
<br>
<div class="box" style="box-shadow: 20px 10px 5px magenta">
<p>box-shadow: 20px 10px 5px magenta</p>
</div>
<div class="box" style="box-shadow: 20px 10px magenta">
<p>box-shadow: 20px 10px magenta</p>
</div>
<div class="box" style="box-shadow: magenta -40px -20px">
<p>box-shadow: magenta -40px -20px</p>
</div>
<div class="box" style="box-shadow: 20px 10px rgba(255,0,255,0.5)">
<p>box-shadow: 20px 10px rgba(255,0,255,0.5)</p>
</div>
<div class="box" style="box-shadow: -40px -20px rgba(255,0,255,0.5)">
<p>box-shadow: -40px -20px rgba(255,0,255,0.5)</p>
</div>
</div>
<div id="with-bg"></div>
<script>
const noBg = document.getElementById("no-bg");
const withBg = document.getElementById("with-bg");
withBg.append(...[...noBg.childNodes].map(node => node.cloneNode(true)));
</script>
</body>
</html>