CSS is a computer language. Used to control the display of the effect in HTML.
There are five ways to use CSS:
1 default such as some tags (elements) with the CSS effect
2 inline style directly inside the tag to set the CSS.
3 inline styles are set in <style></style>.
[email protected] URL (". css file") Import style
5 link Style <link type= "Text/css" rel= "stylesheet" href= ". css file"/">
Priority in-line > Inline > Import or link > default
Get the coordinates of an element offsetleft/offsettop/offsetwidth/offsetheight/offsetparent
The default for Div is the box model hierarchy: margin Border padding content
Relative positioning relative/absolute positioning absolute/fixed positioning
The Z-index value is an integer. The default is 0. can be negative.
The larger the value, the more forward. Overwrite the effect behind.
The basic style has
Font/text/background/border/
Text-align (left,right,center); alignment
Text-decoration (enum value: None, underline underline, overlint underlined, line-through dash ...) Text decoration
Text-indent (length unit px,% percent, em one character, in,cm,mm ...) Length value of indentation
Color: (+ color word); Red, orange, yellow, green, blue, indigo, purple
Color:rgb (255,0,0) [0.255] The color of the composition. Decimal Red/green/blue components
Color:rgba (0,0,0,0) [0.255] four colors three colors plus one transparent color
CSS features. The parent Tag property is inherited by a quilt tag. If a property is set in a child tag, overrides the Parent property
The final result of a label is the overlay of a variety of display effects.
CSS Beginner Summary