Alt-k
2/25/2020 - 8:49 AM

背景画像に透過カラーを重ねる

<div class="bg">
    <p>背景に透過カラー</p>
</div>
.bg{
background: url(/* 画像URL */);
background-size: cover;
position: relative;
height:100%;
}

.bg::before{
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0,0,0,0.5);
}