Computer >> คอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

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>