[Front-end Lao Zhao's CSS Concise Tutorial] 3-1 Commonly used CSS basic styles

 

Hello everyone, I am Lao Zhao, the front end, and welcome to this course. Today we will learn some commonly used CSS basic styles, such as color, font, background and so on. These styles are the basis of CSS and are commonly used in front-end development. Learning these basic styles well can lay a solid foundation for our subsequent development.

First, let's learn about color styles.

In CSS, colors can be represented by color names, hexadecimal numbers, RGB, etc. For example, we can use the color name "red" for red, or the hexadecimal number "#FF0000" for red.

Here is a sample code, let's see the effect:

 

Next, let's learn about font styles.

In CSS, we can set the font size, style, thickness, etc. For example, we can use the "font-size" property to set the font size, the "font-style" property to set the font style, and the "font-weight" property to set the font weight. Here is a sample code, let's see the effect:

Finally, let's learn about background styles.

Guess you like

Origin blog.csdn.net/superheaaya/article/details/129492623