display
Last updated
Last updated
An element that is floated is automatically display: block
.
value
notes
block
width = 100% by default
ไฝๅฏ่จญๅฎ width, height
ๆ็ๆๆไฝๆๆด่ก(็ฑไธๅพไธๆ)
line breaks are inserted before and after the element.
inline
็กๆณ่จญๅฎ width
, height
ใ(width ็ฑ content ๆฑบๅฎ) โญ๏ธ
ๆ็ๆ็ฑๅทฆ่ณๅณ
็กๆณ่จญๅฎ margin-top
, margin-bottom
ใโญ๏ธ
inline-block
ๆ็ๆนๅผๅ inline ๅ ็ด ๏ผไฝๅฏ่จญๅฎ width, height ๅ block ๅ ็ด ใ
ๅ
งๅปบ็ inline-block ๅ
็ด ๅ
ฑไบๅ๏ผimg
, button
, select
, input
, textarea
inline-flex
ๆ็ๆนๅผๅ inline-block ๅ ็ด ใ
wonโt automatically grow to 100% width.