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

จัดสไตล์ตัวเลขลำดับในรายการมีลำดับด้วย CSS (list-style-type)


คุณสมบัติ list-style-type สำหรับ ordered list

คุณสมบัติ list-style-type ให้คุณควบคุมรูปทรงหรือสไตล์ของตัวอักษรลำดับในรายการมีลำดับ (ordered lists)

ตัวอย่าง

<html>
  <head>
  </head>
  <body>
    <ol style="list-style-type:decimal;">
      <li>India</li>
      <li>US</li>
      <li>UK</li>
    </ol>
  </body>
</html>

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

  • decimal - 1, 2, 3... (ค่าเริ่มต้น)
  • decimal-leading-zero - 01, 02, 03...
  • lower-alpha - a, b, c...
  • upper-alpha - A, B, C...
  • lower-roman - i, ii, iii...
  • upper-roman - I, II, III...
  • lower-greek - α, β, γ...
  • thai - ก, ข, ค...