I. Block-level elements and row-level elements
To understand the differences between display: inline, block, and inline-block, you must first understand the features of block-level and line-level elements in HTML. In-line elements are also called
Display:block is the display of elements as block-level elements.The block element is characterized by:Always start on a new line;Height, row height and top and bottom margin can be controlled;The width defaults to 100% of its container unless a
Inline-block past and present
Trace | Time:
Once upon a time, the code "display: inline-block; * display: inline; * ZOOM: 1;" was everywhere. Modern browsers now fully support this attribute value. The above code is only for compatibility
Once upon a while, Display:inline-block has been deep into the streets, everywhere "display:inline-block; *display:inline; *zoom:1; "Such a code. Today, modern browsers have fully supported this property value, and the code above is for
Once upon a while, Display:inline-block has been deep into the streets, everywhere "display:inline-block; *display:inline; *zoom:1; "Such a code. Today, modern browsers have fully supported this property value, and the code above is only for
Display: inline-block compatible ie6/7 writing, inline-blockie62. What is the function of display: inline-block?
Using the display: inline-block attribute, you can change an element or block element in the row into a block element in the row. Simply
Once upon a while, Display:inline-block has been deep into the streets, everywhere "display:inline-block; *display:inline; *zoom:1; "Such a code. Today, modern browsers have fully supported this property value, and the code above is for
The difference between block elements and inline elements.
Only one row can set the margin in the width, height, and vertical direction, and the margin and padding in the horizontal direction of padding.
Block Element: Yes, yes, yes
Inline element:
Block-level element Classification (Original: http://kevinpeng.iteye.com/blog/743936)
Block-level elements include structured block elements, terminal block elements, and multi-object block elements.
1. Structured block elements
These
CSS2.1SPEC: Inclusion block of the visual formatting model,The original style is the most delicious. When reading CSS standards, I have a deeper understanding of this, one of the major feelings after reading the document is that many styles that
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.