使用 CSS 給陰影新增模糊效果


要給陰影新增模糊效果,可以使用 box-shadow 屬性。

您可以嘗試執行以下程式碼來新增模糊效果

示例

演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         h2 {
            box-shadow: 10px 10px 7px green;
            height: 50px;
            background-color: yellow;
         }
      </style>
   </head>
   <body>
      <h2>Heading Two</h2>
      <p>Above heading has shadow.<p>
   </body>
</html>

更新日期:2020-06-23

1K+ 瀏覽量

開啟你的職業生涯

完成課程即可獲得認證

開始學習
廣告