Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the CSS properties

Shulou Source: shulou.com Published: 2022-06-01 11:11:25 10月03日 Update

This article will explain in detail what the attributes of CSS are, and the editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

1.CSS background attribute (Background)

Background-color background color, with values such as red,#FF0000

Background-image background image, such as background-image:url (". / images/bg.png")

Background-position background start position, including horizontal (X axis) and vertical (Y axis) settings X axis value: left,center,right or pixel value or percentage Y axis value: top,center,bottom or pixel value or percentage

| background-repeat background filling method. Value: repeat-x | repeat-y | no-repeat |

2.CSS inside margin attribute (Padding)

3.CSS text attribute (Text)

Color sets the color of the text, such as red,#FF0000

Line-height sets the line height of the text

Text-align sets the alignment of text, such as left, center, right

Text-decoration settings text decoration, such as underline, none, line-through

4.CSS font properties (Font)

Font-weight sets font weight

Font-size sets the font size

Font-family sets font family

Class selector (.class)

Format: .classname {font-size: 16px;}

Note: the same class with different tags can be given on the web page.

ID selector (# id)

Format: # idname {font-size: 16px;}

This is the end of this article on "what are the CSS attributes?". 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, please share it for more people to see.

Tags: Attributes text background font article pixel direction way more format percentage percentage selection different good practical same location content picture Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Technology Docker Shulou Tech Info Linux