<div class="container">
<div class="inner">
<div class="contents-wrapper">
<p class="text">背景色と「テキスト&画像」にmix-blend-mode</p>
<img src="https://drive.google.com/uc?export=view&id=1VDIZg2YmeyoJaLbwhlbiAm7f_3u8bT0L" alt="">
</div>
</div>
</div>
* {
box-sizing: border-box;
margin: 0;
padding:0;
}
html,
body{
height: 100%;
}
.container {
display: flex;
justify-content: center;
background: #5b7e91;
}
@media screen and (max-width: 480px) {
.container {
height: 80%;
}
}
.inner {
position: relative;
transform: rotate(5deg);
background: #5b7e91;
height: 300px;
width: 80%;
display: flex;
justify-content: center;
}
.contents-wrapper {
position: absolute;
left: 50%;
transform: translateX(-50%);
width: 80%;
text-align: center;
mix-blend-mode: overlay;
}
.text {
display: inline-block;
margin: 1em 0;
color: #fff;
font-size: 1.3em;
}
img {
width: 100%;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.