Continue ... ============================================================================================= floating styles and features Floating: is to make elements out of the document flow, arranged in a certain way, encountered adjacent floating elements or the boundaries of the parent to stop floating characteristics 1. Floating elements in the same row 2. Floating element content open width 3. Floating elements support all CSS styles 4. Floating elements out of the document Stream 5. Floating element Promotion level half level (property cover content overflow, can do text wrapping div effect) Note: 1.overflow overflow will recalculate element space: hidden overflow hidden : Auto Overflow scroll bar appears: Scroll scroll bar 2. The center of the element margin:0 auto; 3. Pseudo-class pseudo-class of elements: It is the special properties of some elements of CSS: Hover mouse pause: After the element content after the insertion of some content ================================= The common methods and advantages and disadvantages of ============================================================BFC BFC is that the floating element is used to deal with the problem of moving elements out of the document Stream 1. Parent also floats Disadvantage: The margin:0 auto will fail 2. Add Display:inline-block to the parent level; Disadvantage: the margin:0 auto; will fail (if you need to center the element to the parent plus text-align:center) 3. Add a line to the parent high disadvantage: poor extensibility 4.br label Wrap 5.clear The clear element does not allow other floating elements to appear in one Direction Clear:both (recommended) 6. Pseudo-Class clear floating: after{content: ""; Display:block; CLEAr:both; Characteristics of}============================================================================================= Positioning Positioning: To set an element in a certain way to the grinding position of the page position relative positioning relative for their own position to locate the absolute positioning absolute Locates the origin of the parent that has the location, and if the parent is not positioned, the parent of the parent is found. And so on, if none, the document will be positioned. Note: Absolute positioning even if there is no initial value, also set the value (such as: left:0px; top:0px;) Fixed positioning Fix offset for page window: Left top right bottom (with priority left,top>right,bottom) relative positioning relative 1. Does not affect the characteristics of the element itself 2. Not out of the document Stream 3. Elevation level 4. Unable to trigger BFC 5. Position the absolute position for itself absolute 1. Out of document Flow 2 . Content completely open height and width 3. Support for all CSS styles 4. Ascending level Z-index: value; Positioning level setting the higher the value, the higher the level 5. Absolute positioning to be used with relative positioning 6. Self has floating, can be omitted floating operation fixed positioning 1. Incompatible IE6 2. Positioning for the window 3. If the children of fixed positioning also have floating, you can omit the clear floating operation
Summarize
So far, the basic knowledge of html/css is probably over. There are some minor details that need to be learned slowly in practice.
HTML/CSS Study (ii)