Home > Web Front-end > CSS Tutorial > Three major characteristics of css and an introduction to setting background transparency

Three major characteristics of css and an introduction to setting background transparency

不言
Release: 2018-08-06 10:36:13
Original
1811 people have browsed it

This article introduces to you the three major characteristics of CSS and the introduction of setting background transparency. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

About inline elements (one more thing)

Inline elements can only accommodate text or other inline elements. (Block-level elements can be placed inside a special a)

Example:

Tips about row height:

Nesting of selectors The level should not be greater than level 3, and the qualification conditions at the back should be as precise as possible.

The attribute definition must start on a new line.

About row height measurement:

##Three major characteristics of css (cascading priority inheritance)

a. Cascading: The superposition of multiple css styles

is the browser's ability to handle conflicts. If an attribute is set on the same element through two identical selectors, then this Sometimes one attribute will cascade another attribute.

Generally, if there is a style conflict, the order in which the CSS is written will be followed, and the last style will prevail.

b. Priority

When defining css styles, it is often the case that two or more rules should be on the same element, and then priority issues will arise.

The weight of styles can be superimposed

Generally speaking

Inline tags > ID selector> Class label> Tag selector> Wildcard selector (without Weight)

tip: Background translucency setting background: rgba (0, 0, 0, 3);

The last parameter is alpha transparency. Take The value range is between 0-1

Note: Background translucency means that the background of the box is translucent, and the content inside the box is not affected.

Related recommendations:

New properties in css3: Summary of css3 multi-column layout properties (with examples)

A brief analysis of CSS Border properties: width & style & border, etc.

Introduction to two methods of CSS grid layout (with code)

The above is the detailed content of Three major characteristics of css and an introduction to setting background transparency. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template