css| Skills | website | optimization
Optimization Code: web page Technology CSS font properties of the abbreviation of the skills, abbreviations to reduce the code, optimize the CSS to make it more reasonable.
The CSS Font property is used to control text font, color, size, and so on. There are a variety of font properties, and in general, we use abbreviations to generalize a number of attributes in a single CSS code. This greatly reduces the code and optimizes the CSS file.
The following six kinds of font properties are commonly used:
Font-style set oblique body such as: font-style:italic;
Font-weight set text thickness such as: font-weight:bold;
Font-size set text size such as: font-size:12px;
Line-height set line spacing such as: line-height:150%;
Color Set text colors (note is not font-color) such as: color:red;
Font-family set fonts such as: font-family: "Lucida Grande", Verdana, Lucida, Arial, Helvetica, XXFarEastFont-Franklin, Sans-serif;
We can summarize the above attributes in one line of the Font property. Note that the color attribute needs to be defined separately.
Font:italic bold 12px/150% "Lucida Grande", Verdana, Lucida, Arial, Helvetica, XXFarEastFont-Franklin, Sans-serif;
The above example uses a row to define the Font property, respectively: Font-style font-weight font-size line-height font-family, and color set text colors to be defined separately.