Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the basic knowledge of Css technology

Shulou Source: shulou.com Published: 2022-06-01 06:35:02 09月28日 Update

This article will share with you what is the basic knowledge of Css technology. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

First, inline elements, block-level elements and the three major characteristics of CSS

1. Inline elements, block-level elements

The elements in the line will be arranged in a straight line, all on the same line, horizontally.

Block-level elements occupy a row and are arranged vertically. Block-level elements start and end with a new line, followed by a line break.

Block-level elements can contain inline elements and block-level elements. Inline elements cannot contain block-level elements.

Inline elements and block-level elements can be converted through display attributes

2. Three characteristics of CSS

Inheritance: set some attributes to the parent element, and child elements can also use the

Cascading: if an attribute is set to the same element through two selectors, one attribute will cascade the other.

Priority: id selector > class selector > tag selector > wildcard > inheritance

Second, the box model of CSS

All HTML elements can be thought of as boxes, and in CSS, the term "box model" is used in design and layout. The CSS box model is essentially a box that encapsulates the surrounding HTML elements, including: margins, borders, padding, and actual content.

Margin (margin)-clears the area outside the border, which is transparent.

Border (border)-the border around the inside margin and outside the content.

Padding (inside margin)-clears the area around the content, and the inside margin is transparent.

Content (content)-the contents of the box, displaying text and images.

Thank you for reading! This is the end of this article on "what is the basic knowledge of Css technology". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Tags: Elements content attributes boxes borders selection knowledge basics technology one line three regions directions more models features articles good practical two Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Technology NVidia OPPO Reno Shulou Information