At the beginning, the author tells us the correct way to learn------first. After having a certain foundation, it is necessary to try to do some small things. In the process of learning to maintain the balance in and out, no output is equal to no input. A lot of experience is always the same, similar to the correct truth, always in a variety of situations can be cautioned.
The correct way to learn CSS, it is in a certain basic knowledge, it is necessary to read more source code, look at other people's small examples, try to bold in their own web site application.
The advent of new technologies, often due to the limitations of old technologies, is also true of CSS. In the early days, HTML was taking on too many "features". Font tags are used to control a variety of styles, cumbersome table nesting to layout. A large number of font and table applications make the structure of HTML confusing, not conducive to modification, the bug is difficult to debug. In this case, CSS appears, CSS is designed to control the page in the Style section, so that the HTML can be returned to his duties, only need to build a structure, the style of the parts are all handed to the CSS to deal with. The separation of structures and styles makes it easier to maintain and develop, and for HTML tags, we can use them in semantics rather than just for layout.
The structure of HTML, as important as the foundation of a building, is a prerequisite for the development of CSS and JS. There are three ways to associate HTML with CSS, inline styles, internal styles, and external styles. In the development, try to use a unified way to apply CSS, avoid the difference in priority, and lead to the confusion of style. When writing CSS, it is reasonable to block, the same functions to be done together, first write general general style, and then write special. Easy to maintain and modify.
Base selector:
ID selector, class selector, tag Selector, wildcard selector
Combo selector:
Descendant selector, group selector, child element selector, adjacent selector
Property Selector
Pseudo class Selector
CSS Basics and selectors--Mastering CSS Learning notes (i)