CSS3 多色漸變


你可以嘗試執行以下程式碼,以便在 CSS3 中實現多色漸變——

示例

即時演示

<html>
   <head>
      <style>
         #grad2 {
            height: 100px;
            background: -webkit-linear-gradient(red, orange, yellow, red, blue, green,pink);
            background: -o-linear-gradient(red, orange, yellow, red, blue, green,pink);
            background: -moz-linear-gradient(red, orange, yellow, red, blue, green,pink);
            background: linear-gradient(red, orange, yellow, red, blue, green,pink);
         }
      </style>
   </head>
   <body>
      <div id = "grad2"></div>
   </body>
</html>

更新於: 2020 年 6 月 29 日

166 次瀏覽

開啟你的 事業

完成課程並獲得認證

開始
廣告
© . All rights reserved.