Transferred from: http://blog.csdn.net/shenzhennba/article/details/7356095
1. Font properties mainly include the following:
font-family (font family): "Arial", "Times New Roman", "Song Body", "bold" and so on;
Font-style (font style): normal (normal), italic (italic), or oblique (italic);
Font-variant (font Change): normal (normal) or small-caps (small capital letters);
Font-weight (font bias): is normal or bold (bold). Some browsers even support the use of numbers from 100 to 900 (in hundred units);
Font-size (font size): Can be set in a number of different units (such as pixels or percentages), such as: 12xp,12pt,120%,1em
If you use the Font property, you can simplify several styles to reduce the number of books; The value of the Font property should be written in the following order (separated by a space between the attributes):
Font-style | Font-variant | Font-weight | Font-size | Font-family
For example:
. FONTSTYLE01 {
Font-style:italic;
Font-variant:normal
Font-weight:bold;
font-size:30px;
Font-family:arial, Sans-serif;
}
The above style is abbreviated as:
. FONTSTYLE01 {font:italic normal bold 12px Arial,verdana;}
2. Background
background-color: #999999;//element background color
background-image : url ( "Path/bgfile.gif"); Set background image
background-repeat : repeat-x | repeat-y | repeat | no-repeat;//Set Repeat
background-attachment : fixed | Scroll Sets the fixed way of the background picture
background-position : x axis coordinates, y coordinate [top,bottom,center,left,right,20px,10%]; Sets the position of the upper-left corner of the background, in which the coordinates can be abbreviated as a percentage or a fixed unit
Background each value in the following order:
background-color | background-image | Background-repeat | background-attachment | Background-position
If you omit a property from being written out, the default value is automatically taken for it. For example, if you remove Background-attachment and background-position:
background: #FFCC66 URL ("butterfly.gif") no-repeat;
For example:
. bg01 {
background-image:url ("Path/bgfile.gif");
background-repeat:no-repeat;
background-attachment:fixed;
background-position:left top;
}
The above can be abbreviated as:
. BG01 {
Background: #FFCC66 URL ("path/bgfile.gif") no-repeat fixed left top;
}
shorthand for CSS (font and background)