1. The margin is transparent by default and therefore does not obscure any subsequent elements.
2. The background is applied to areas composed of content and padding, and borders.
3. The margin can be negative, and in many cases a negative margin is used.
4. Instead of adding padding with the specified width to an element, try adding padding or margins to the element's parent and child elements. (Because ie5.x and 6 use their own non-standard models in quirks mode.) )
5. What happens if you set Border-style to none: Although the width of the border is 50px, the border style is set to none. In this case, not only the style of the border is not, its width will also become 0. The border disappears.
6.h1 {border-width:20px;} because the default value of Border-style is none, if no style is declared, it is equivalent to Border-style:none. All H1 elements do not have any borders, let alone 20 pixels wide.
7. Always declare the Border-style property before the Border-color property.
8. If the border does not have a style, there is no width. However, there are situations where you might want to create an invisible border.
CSS2 introduces the border color value transparent. This value is used to create an invisible border with a width. Border-color:transparent;
9. The vertical adjacent margins of the block-level elements are merged, while the inline elements do not actually account for the upper and lower margins. The left and right margins of the inline elements are not merged. Similarly, the margins of floating elements are not merged. Allows you to specify a negative margin value, but use caution.
10. The height of the combined margin is equal to the larger of the two of the height in which the merged margins occur.
11. Margin merging is only possible with the vertical margin of the block box in the normal document stream. Margins between inline boxes, floating boxes, or absolute positioning are not merged.
12. Set display to none so that the generated element does not have a box at all. In this case, the box and all its contents are no longer displayed and do not occupy space in the document.
The 13.CSS has three basic positioning mechanisms: normal flow, floating, and absolute positioning.
14.CSS Position Properties
Absolute generates an absolutely positioned element, relative to the first one outside of the static locationParent ElementTo locate. ---becomesblock, out of document Flow
The element box is completely removed from the document flow and is positioned relative to its containing block. The containing block may be another element in the document or an initial containing block.
The space that the element originally occupied in the normal document flow is closed as if the element did not exist.
The element is positioned to generate a block-level box, regardless of what type of box it was generated in the normal flow.
Fixed generates an absolutely positioned element that is positioned relative to the browser window.
The relative generates relatively positioned elements that are positioned relative to their normal positions.
static default value. No positioning, element appears in normal stream
The 15.clip attribute trims an absolutely positioned element. Shape sets the shapes of the elements. The only valid shape values are: Rect (top, right, bottom, left).
16. If the content in the element exceeds the given width and height properties, the overflow property determines whether the scroll bar is displayed, and so on.
The 17.top attribute specifies the top edge of the element. This property defines the offset between the top margin boundary of an anchored element and the upper boundary of its containing block.
The 18.z-index property sets the stacking order of elements. Elements that have a higher stacking order are always in front of elements that are lower in stacking order. The Z-index only works on positioned elements.
19. The floating box can be moved left or right until its outer edge touches the border of the containing box or another floating box.
Because the float box is not in the normal flow of the document, the Block box in the normal flow of the document behaves as if the floating box does not exist.
20. A floating element generates a block-level box, regardless of its own element.
If floating non-replacement elements, specify a definite width; otherwise, they will be as narrow as possible.
The 21.clear attribute defines the side on which the element is not allowed to appear floating elements.
Clear:left: Is it a bit of a newline?
Display:block-displaying links as block elements makes the entire link area clickable (not just text), but also allows us to specify the width.
22.<p class= "Important warning" >this paragraph is a very important warning.</p>
If written as p[class= "important", then this rule does not match the sample tag and must match exactly.
23.
[Attribute~=value] is used to select the element in the attribute value that contains the specified vocabulary. Glossary
[Attribute*=value] matches each element of the property value that contains the specified value. include string
: First-child pseudo-class adds a style to the first child element of an element.
24.
Match the first <p> element
<p>some text</p><p>some text</p></body>
Matches the first <i> element in all <p> elements<i>text</i> <i>text</i>. Some <i>text</i>.</p></body>
Matches all <i> elements in the <p> element as the first child element<i>text</i> <i>text</i>. </p><p>some <i>text</i>. Some <i>text</i>.</p></body>
Use: First-child this pseudo-class to match only if the element is the first child element of another element . For example, P:first-child selects all p elements that are the first child element of another element. It is generally thought that this will be selected as the element of the first child element of the paragraph, but in fact it is not, if you want to select the first child element of the paragraph, it should be written as P > *:first-child.
25.
Height-the level of the element content area, outside the content area, to increase the padding, borders, and margins.
The Line-height property sets the distance (row height) between rows. Negative values are not allowed. The difference between the calculated values of the Line-height and Font-size (which becomes "line spacing" in the CSS) is divided into two halves, which are added to the top and bottom of a text line content, respectively.
26.
Replace element:
A replacement element is a browser that displays specific content based on the elements and attributes of its tag.
For example: <input/> type= "Text" is, this is a text input box, another time, the browser display is not the same
X , <input>, <textarea>, <select>, <object> in HTML are all replacement elements, none of which have actual content.
Non-replacement elements:
X Most elements of HTML are non-replaceable elements that they tell the browser directly and display.
such as <p>wanmei.com</p>
The browser will display the content directly.
"CSS" error-prone