Sách CSS/Thuộc Tính viền ngoài (outline)

Tủ sách mở Wikibooks

Định dạng thuộc tính viền ngoài , outline , của phần tử trang mạng

Cú pháp[sửa]

HTML Element { Outline - Property : Value }


Tham số và giá trị
  • outline - color : color| invert
viền ngoài - màu : màu| đảo nguợc
  • outline - style : none| dotted| dashed| solid| double| groove| ridge| inset| outset
  • outline - width : thin| medium| thick| length
Viền ngoài - Kiểu : bình thường| chấm| gạch ngang| đặc| đôi| dảy| ghép|


Thí Dụ[sửa]

 p 
{
   border: red solid thin;
   outline: green dotted thick
}


 p
{
border: red solid thin;
}
  p.dotted {outline-style: dotted}
  p.dashed {outline-style: dashed}
  p.solid {outline-style: solid}
  p.double {outline-style: double}
  p.groove {outline-style: groove}
  p.ridge {outline-style: ridge}
  p.inset {outline-style: inset}
  p.outset {outline-style: outset}
}
p 
{
  border: red solid thin;
  outline-style: solid;
  outline-color: #00ff00
}
p.one
{
  border: red solid thin;
  outline-style: solid;
  outline-width: thick
}
p.two
{
  border: red solid thin;
  outline-style: solid;
  outline-width: 2px
}