CSS ทำซ้ำรัศมีการไล่ระดับสี ()ฟังก์ชั่น
ตัวอย่าง
การไล่ระดับสีแบบเรเดียลซ้ำ:
#grad {
background-image: repeating-radial-gradient(red, yellow 10%, green 15%);
}
ความหมายและการใช้งาน
ฟังก์ชัน repeating-radial-gradient() ใช้เพื่อทำซ้ำการไล่ระดับสีในแนวรัศมี
รุ่น: | CSS3 |
---|
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่รองรับฟังก์ชันนี้อย่างเต็มที่
ตัวเลขตามด้วย -webkit-, -moz- หรือ -o- ระบุเวอร์ชันแรกที่ทำงานกับคำนำหน้า
Function | |||||
---|---|---|---|---|---|
repeating-radial-gradient() | 26.0 10.0 -webkit- |
10.0 | 16.0 3.6 -moz- |
6.1 5.1 -webkit- |
12.1 11.1 -o- |
ไวยากรณ์ CSS
background-image: repeating-radial-gradient(shape size at position, start-color, ..., last-color);
Value | Description |
---|---|
shape | Defines the shape of the gradient. Possible values:
|
size | Defines the size of the gradient. Possible values:
|
position | Defines the position of the gradient. Default is "center" |
start-color, ..., last-color | Color stops are the colors you want to render smooth transitions among. This value consists of a color value, followed by an optional stop position (a percentage between 0% and 100% or a length along the gradient axis). |
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: CSS การไล่ระดับสี