<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
:root
{
--color1:orange;
--color2:blue;
}
div
{
height: 200px;
width: 200px;
}
.div1
{
background-color:var(--color1);
position:absolute;
z-index:1;
}
.div2
{
background-color:var(--color2,green);
position:absolute;
z-index: 2;
left: 50px;
top: 50px;
}
</style>
</head>
<body>
<div class="div1">
</div>
<div class="div2">
</div>
</body>
</html>
0 Comments