Some basic contents of CSS

The best way to clear floats (add this attribute to the parent element)

 .clearfix::after {content: ""; display: block; clear: both;}

Select The first bit in the side-by-side element is set to this attribute (now set to a multiple of six) */

main .movies:nth-child(6n){ margin-right: 0; }

position
Default value: static, static positioning (no positioning)
relative: relative positioning
absolute: absolute positioning
fixed: fixed positioning*/< /p>

50% of border arc (that is a circle) */

border-radius: 50%; 

If the width of the mouse is increased when the mouse is swiped, it will cause a phenomenon similar to jitter (only Solve the width problem)

(For the time being, the height can only be solved by reducing the line height after the stroke) /
The width and height settings include padding and content
/

box-sizing:border-box;

How to set translucency*/

< p>background-color:rgba(0,0,0,0.5)

Select the first child element

:first-child

Select the first element of the specified type in the child element

:first-of-type< /p>

Select the last child element

:last-child

Select the last element of the specified type in the child element

:last-of-type

Select the specified child element

nth-child
even: keyword, equivalent to 2n
odd: keyword, Equivalent to 2n+1

select the element of a certain type among the specified sub-elements

nth-of-type

transparency

  1. opacity, it sets the entire element (including sub-elements ) Transparency, its value is 0 ~ 1
  2. Set the alpha channel (rgba) at the color position

Leave a Comment

Your email address will not be published.