Pseudo-Class selectors:
Pseudo-class is directly behind the element with ":", such as a:hover, can be used directly in CSS instead of in HTML like class definition, because the browser is pre-set.
A general order is: a:link{} not visited status link
a:visited{} visited Status link
a:hover{} state on mouse hover
There are other pseudo-classes, such as First-child, that correspond to the first child element, last-child the last child element, Nth-child (even/2n) An even number of child elements, and Nth-child (odd/2n+1) The odd number of child elements.
Definition of Box model:
CSS considers each element to be a box, including the following properties:
Content Areas Contents Area: Contains content, content can determine the size, you can also set the width and height. The element's Width property specifies the width of the content area, which can be specified by pixel or as a percentage relative to the size of the container, such as the body Div, where the element resides.
Padding padding: A transparent area outside the content area, which can be seen as part of an element, setting the background of the element to extend to the inner margin.
Border border: The border around the inner margin.
Margins margin: A transparent area outside the bounding rectangle that provides the interval between elements and elements, and the element background does not extend to the margin. The left and right margins of the element (inline, like) are added, and the upper and lower margins of the (block element) are folded, taking the largest, and nesting. Additionally, the margins of the floating element and the margins in the normal flow are not collapsed.
HTML and CSS Basics points (i)