# CSS 34. Opacity / 透明度設定與簡介 ### 使目標元素透明度改變 - opacity 可設定範圍: **0 ~ 1.0** // 0 為完全透明。 ``` <h1>標題測試</h1> ``` ``` h1 { display: inline-block; background: red; } ``` ![](https://i.imgur.com/5ry1ywK.png) ### 設定 h1 的 opacity: ``` h1 { // 設定: 0.5 display: inline-block; background: red; opacity: .5; } ``` - 瀏覽其差異: ![](https://i.imgur.com/GAbuZHP.png) ###### tags: `2022 網頁開發全攻略教程 / CSS篇章 - CSS 進階-1`