Every programmer who learns a programming language must learn HTML and CSS, which are not programming languages, but markup languages. The former is used to add the structure of the Web page, the latter is the style, used to beautify the HTML structure. In this article, we focus on the learning methods of CSS.
To learn CSS, the first is to learn the handbook
Recommended Learning CSS Online Handbook.
After learning the manual, you can learn the example tutorial
Recommended Learning CSS 0 Basic Getting Started tutorial is more suitable for beginners to learn.
Here's a look at the learning steps:
1.CSS rules.
Syntax for pseudo-classes:
Selector:pseudo-class {property:value;}
CSS classes can also use pseudo-classes:
Selector.class:pseudo-class {property:value;}
Http://www.php.cn/css/css-pseudo-classes.html
2.CSS declaration.
Http://www.php.cn/code/3213.html
3. Different notation and units of the value.
Http://www.php.cn/code/3148.html
4. Grouping of selectors.
There are many elements in the style sheet that have the same style, and in order to minimize the code, you can use the grouping selector. Each selector is separated by commas.
<style> h1,h2,p {color: #d4d223;} </style>
Http://www.php.cn/code/3241.html
5. Inheritance.
HTML { Font-family:sans-serif;} p { line-height:1.5;}/*this rule is not needed↷p a { line-height:1.5;} */
Http://www.php.cn/css-tutorial-360263.html
6. Derive selectors.
Http://www.php.cn/code/3287.html