css 短い記述で背景画像を透過させる方法

背景画像を透過にする場合、背景画像を表示するdivの中に透過の背景色を表示するdivを入れ子にする等して透過させることが出来ます。
今回は、divの入れ子を使わずに背景画像を透過にする方法をご紹介します。
・html
|
1 2 3 |
<div class="wrap01"> <p>テキスト</p> </div> |
・透過させない状態

白っぽく透過
・css
|
1 2 3 4 5 6 7 8 |
.wrap01 { width: 600px; height: 400px; background: url(images/img01.jpg) no-repeat 0px 0px; background-size: cover; background-color: rgba(255,255,255,0.3); background-blend-mode: lighten; } |
ポイント
background: url で背景画像を指定
background-color: rgba で白透過の背景色を指定
background-blend-mode: lighten; で背景画像と背景色を明るくブレンドする
background-blend-modeは背景画像と背景画像のブレンドを行うことができます。

黒っぽく透過
・css
|
1 2 3 4 5 6 7 8 |
.wrap01 { width: 600px; height: 400px; background: url(images/img01.jpg) no-repeat 0px 0px; background-size: cover; background-color: rgba(0,0,0,0.3); background-blend-mode: darken; } |
ポイント
background: url で背景画像を指定
background-color: rgba で黒透過の背景色を指定
background-blend-mode: darken; で背景画像と背景色を暗くブレンドする

![MARKLEAPS[マークリープス]](https://markleaps.com/blog/wp-content/themes/mkl/images/00_logo.png)


![[CSS] shape-outside プロパティで画像にテキストを回り込ませる方法](https://markleaps.com/blog/wp-content/uploads/2025/09/css-shape-outside-500x254.jpg)
![[HTML・CSS] 説明リストdlのdtとddを横並びに表示する方法(コピペで使えるコード付き)](https://markleaps.com/blog/wp-content/uploads/2025/09/html-css-dl-flex-grid-500x254.jpg)
![[CSS] 疑似クラス is() とwhere() の使い方と違い](https://markleaps.com/blog/wp-content/uploads/2023/11/css-is-where-500x254.jpg)