Front-End Knowledge Learning II: CSS Advanced

Source: Internet
Author: User

One: Grouping of selectors

By grouping multiple elements so that the elements in the same group satisfy the same attributes, the method does not need to be defined more than once. But the disadvantage of this is that you can only define common properties, you cannot define individual properties, but the different properties of this individual can be defined by a higher priority level, you can define different attributes, or you can overwrite the operation.

This is a CSSD group selector.

Two: inheritance and group selector

In general, after we have defined the attributes in the parent element, we can no longer define the property in the child element, but instead automatically inherit the parent element's properties, but because some browsers might not support this inheritance. In this case, we can assign values to multiple child elements by using the group selector.

Three: Inheritance issues for child elements

In general, the properties of a child element inherit the value of the same property of the parent element, but when we do not want the value of the child element to be the same as the value of the parent element, we can define a declaration specifically for the child element, so that the child element does not inherit the value of the parent element.

Front-End Knowledge Learning II: CSS Advanced

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.