Html/css: changes the parent attributes of child inheritance. css inherits

Source: Internet
Author: User

Html/css: changes the parent attributes of child inheritance. css inherits

A beautiful webpage requires many styles. The font color or size set on the parent is not necessarily the same among its child elements. What should I do if I want to change the style of one of them.

Many new users don't understand why I used the class to name it separately, and I still haven't changed the settings. I will consider whether the format is wrong or the name is incorrect, but have you considered the weight value? New users do not pay much attention to the use of the weight value, but it is actually very useful.

ID selector value 100, class, pseudo class, attribute selector value 10, element selector value 1, maybe use ID name, directly change the style will change, however, after all, the ID naming method does not use much class naming. At this time, as long as you pay attention to the weight value, you will know the benefits.

Related Article

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.