Backgrounds and Borders
1. Background
Selecting with a class
. class Name {
Background: color;
}
2. Border
Select with Class
. class Name {
Background: color;
BORDER:NPX Solid color code
}
Solid can be replaced with a dased line for dot-like
Common styles
The text size. Text thickness, and font
1.FONT-SIZE:NPX;
2.font-weight: Bold Normal
3.font-family: "";
Text color, text alignment, text decoration
1.color:;
2.text-align:;left Right Center
3.text-decoration:none; Rarely used, generally used in the underline of clearly linked text
Box model (Box model)
WIDTH:NPX;
HEIGHT:NPX;
Background:;
PADDING:NPX; Inner margin
margin:npx; outer margin
Margin
Border
Padding
Positioning
1.bsolute
Creates an absolutely positioned element that is positioned relative to the first parent element other than the static anchor.
The position of the element is defined by the "left", "Top", "right" and "bottom" attributes.
2.fixed
Generates an absolutely positioned element that is positioned relative to the browser window.
The position of the element is defined by the "left", "Top", "right" and "bottom" attributes.
3.relative
Creates a relative positioned element, positioned relative to its normal position.
Therefore, "left:20" adds 20 pixels to the left position of the element.
4.static default value. No positioning, elements appear in the normal stream (ignoring top, bottom, left, right, or z-index declarations).
5.inherit Specifies that the value of the position property should be inherited from the parent element.
Clear floating
Float:;left Right Center
Clear floating clear:both;
This article from "Big Plum" blog, declined reprint!
CSS Learning Basics Detailed (Common)