CSS list-style-imageคุณสมบัติ
ตัวอย่าง
ระบุรูปภาพเป็นตัวทำเครื่องหมายรายการในรายการ:
ul
{
list-style-image: url('sqpurple.gif');
}
ความหมายและการใช้งาน
คุณสมบัติlist-style-image
แทนที่เครื่องหมายรายการด้วยรูปภาพ
หมายเหตุ:ระบุคุณสมบัติlist-style-typeเพิ่มเติมเสมอ คุณสมบัตินี้ถูกใช้หากภาพไม่พร้อมใช้งานด้วยเหตุผลบางประการ
ค่าเริ่มต้น: | ไม่มี |
---|---|
รับการถ่ายทอด: | ใช่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS1 |
ไวยากรณ์ JavaScript: | วัตถุ .style.listStyleImage="url('smiley.gif')" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
list-style-image | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
ไวยากรณ์ CSS
list-style-image: none|url|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description | Play it |
---|---|---|
none | No image will be displayed. Instead, the list-style-type property will define what type of list marker will be rendered. This is default | |
url | The path to the image to be used as a list-item marker | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: รายการ CSS
การอ้างอิง CSS: คุณสมบัติรายการสไตล์
การอ้างอิง HTML DOM: คุณสมบัติ listStyleImage