Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> JavaScript

การใช้งานคุณสมบัติ list-style-type ใน CSS


คุณสมบัติ list-style-type

คุณสมบัติ list-style-type ให้คุณควบคุมรูปทรงหรือลักษณะของ marker ลองรันโค้ดต่อไปนี้เพื่อนำ list-style-type property ไปใช้:

ตัวอย่าง

<html>
  <head>
  </head>
  <body>
    <ul style="list-style-type:circle;">
      <li>India</li>
      <li>Australia</li>
    </ul>
  </body>
</html>

ค่าสำหรับ unordered list:

  • disc - วงกลมทึบ (ค่าเริ่มต้น)
  • circle - วงกลมว่าง
  • square - สี่เหลี่ยมทึบ
  • none - ไม่มี marker

ค่าสำหรับ ordered list:

  • decimal - 1, 2, 3...
  • lower-alpha - a, b, c...
  • upper-alpha - A, B, C...
  • lower-roman - i, ii, iii...
  • upper-roman - I, II, III...