<div class="wrapper">
<div class="inner">
<div class="box"></div>
</div>
</div>
html,
body{
height: 100%;
}
.wrapper{
box-sizing: border-box;
border: 10px solid #000;
background-image: url(https://kakechimaru.com/wp-content/uploads/2021/11/211120_03.jpg);
background-size: cover;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
position: relative;
}
.wrapper::before{
content: ".wrapper要素";
color: #000;
font-size: 14px;
font-weight: bold;
position: absolute;
top: 10px;
left: 10px;
}
.inner{
transform: skew(10deg);
border: 10px solid #646464;
display: flex;
align-items: center;
justify-content: center;
width: 70%;
height: 70%;
position: relative;
}
.inner::before{
content: ".inner要素";
color: #646464;
font-size: 14px;
font-weight: bold;
position: absolute;
top: 10px;
left: 10px;
}
.box{
mix-blend-mode: multiply;
background-color: blue;
padding-top: 45%;
width: 45%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.box::before{
content: ".box要素";
color: #fff;
font-size: 14px;
font-weight: bold;
position: absolute;
top: 10px;
left: 10px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.