CSS/Thuộc Tính danh sách(list)

From Wikiversity
< CSS

Chức năng[edit]

Thuộc tính danh sách list

Cú pháp[edit]

list-style-Thuộc tính : Giá trị

Tham số và giá trị[edit]

  • list-style-type:none|disc|circle|square|decimal|decimal-leading-zero|lower-roman
kiểu danh sách:không có|hình tròn|hình vuông|thập phân|kiểu số o
  • list-style-position:inside|outside
vị trí danh sách:bên trong|bên ngoài
  • list-style-image:none|url
kiểu hình ảnh danh sách|:không có|đưòng dẩn

Thí dụ[edit]

 ul.disc
{
  list-style-type: disc
}

 ul.circle 
{
  list-style-type: circle
}

 ul.square
{
  list-style-type: square
}

 ul.none 
{
  list-style-type: none
}

ol.decimal
{
  list-style-type: decimal
}
ol.lroman
{
  list-style-type: lower-roman
}
ol.uroman
{
  list-style-type: upper-roman
}
ol.lalpha
{
  list-style-type: lower-alpha
}
ol.ualpha 
{
  list-style-type: upper-alpha
}

ul 
{
  list-style-image: url('arrow.gif')
}

ul.inside 
{
list-style-position: inside
}

ul.outside 
{
list-style-position: outside
}

ul 
{
list-style: square inside url('arrow.gif')
}