Home > Article > Web Front-end > Summary of related usage of inline elements
When the z-index attribute and position attribute are not included, the stacking order of all elements is consistent with the order in which they appear in the HTML document. (Except for the special case of using negative margin to overlap inline elements.) When an element is floated, the floating block element is placed between the non-positioned block element and the positioned block element. In other words, the floating element is displayed in the normal flow. Above descendant block elements, and below descendant inline elements in regular flow. When the position attribute is added to an element, all elements with the position attribute and their sub-elements will be displayed on top of other elements without the position attribute. Z-index is only effective on elements with the position attribute set. The z-index attribute on elements without the position attribute does not take effect. The z-index attribute generates a stacking context. A group of elements with a common parent element that are moved forward or backward together form a stacking context. Each stacking context has a single root element. When a new stacking context is formed on the element, all child elements in the stacking context are limited to a fixed area in the stacking order. A stacking context structure
1. How to use the index attribute? Summarize the usage of index attribute examples
##Introduction: When the z-index attribute and position attribute are not included, all The stacking order of elements is consistent with the order in which they appear in the HTML document. (Except for the special case of using negative margin to overlap inline elements.) When an element is floated, the floating block element is placed between the non-positioned block element and the positioned block element. In other words, the floating element is displayed in the normal flow. Above descendant block elements, and below descendant inline elements in regular flow. When the position attribute is added to an element, all elements with the position attribute and their sub-elements will be displayed in its...
2. 10 recommended articles about block elements
Introduction: When the z-index attribute and position attribute are not included, the stacking order of all elements is The order in which they appear in the HTML document is consistent. (Except for the special case of using negative margin to overlap inline elements.) When an element is floated, the floating block element is placed between the non-positioned block element and the positioned block element. In other words, the floating element is displayed in the normal flow. Above descendant block elements, and below descendant inline elements in regular flow. When an element is added with the position attribute, all elements with the position attribute and its sub-elements will be displayed in its...
3. Summary of definition and usage of floating attribute functions
Introduction: To introduce the float property of CSS, you must first understand the standard document flow standard document flow. Without the intervention of CSS, block-level elements occupy one line. You can set the width and height. In-line elements are displayed side by side, and the width and height are automatically filled.
4. The role and usage of the span tag Summary
##Introduction: is an inline element in the CSS definition, and defines an inline element Area, that is, a row can be divided into several areas by to achieve a specific effect. itself has no properties. span has no fixed format representation. It only changes visually when you apply a style to it.
5.
A brief introduction to floating properties in CSS
##Introduction: Without the intervention of CSS, block-level elements occupy one line alone, and the width and height can be set. In-line elements are displayed side by side, and the width and height are automatically filled. The standard document flow (default layout) of an HTML page is: from top to bottom, from left to right, with line breaks when encountering blocks (block-level elements).
6.
Detailed explanation of examples of line-height and vertical-align properties in css