Home > Article > Web Front-end > Three major characteristics of css and an introduction to setting background transparency
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. PriorityWhen 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 superimposedGenerally speakingInline 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-1Note: 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!