CSS Basics and selectors--Mastering CSS Learning notes (i)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.