The three main features of CSS and the introduction of setting the background transparency

Source: Internet
Author: User
This article introduces to you about the three characteristics of CSS and set the background transparent introduction, there is a certain reference value, the need for friends can refer to, I hope to help you.

About inline elements (add a little)

Inline elements can only hold text or other inline elements. (A special A can put block-level elements)

Example:

About Line Height tip:

The nesting level of the selector should not be greater than level 3, and the qualifying conditions after the position should be as accurate as possible.

The property definition must have a different row.

Measurement of line height:

Three main features of CSS (Cascade precedence inheritance)

A, cascading: A variety of CSS style overlay

is the ability of a browser to handle conflicts, and if a property is set on the same element with two identical selectors, then one property will cascade the other property.

In general, if a style conflict occurs, the final style will prevail in the order in which the CSS is written.

B, priority

When you define a CSS style, there are often two or more rules that should be on the same element, with priority issues.

The weights of the styles can be superimposed

Generally speaking

Inline label > ID selector > class label > tag Selector > Wildcard selector (no weight)

Tip: Background Translucent settings Background:rgba (0,0,0,3);

The last parameter is the Alpha transparency value range between 0-1

Note: The background translucent refers to the box background translucent, the contents of the box is not affected.

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.