Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The setting method of CSS font font

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the "CSS font font setting method" related knowledge, in the actual case of the operation process, many people will encounter such a dilemma, and then let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!

# font size

Font-size sets the font size. Px is a unit that represents the pixels on the screen. In css, most values need to add units.

Font-size: 12px

# font weight

Font-weight sets the font thickness. Values: default (normal), bold (bold), 100,900

Font-weight:bold

Because the font did not set too many thickness standards in the initial design, when it is set with numbers, it will only change at 400,700. In practice, normal (400) bold (700) is the most commonly used.

# Font style

Font-style sets the style of the font (style)

Value: normal displays standard font style italic font slant by default

Font-style:italic

# font type

Font-family sets different fonts, values: Song style, Microsoft Yahei, boldface and so on.

Font-family: song style

Multiple fonts can be written, separated by commas, and the browser will parse them from left to right until they recognize the font installed on the current computer. If there are special characters like space # $in the font name, you also need to add quotation marks to the Chinese font. Understand: http://code.ciaoca.com/style/cssfont2unicode/

Font: font-style font-weight font-size/line-height font-family

Properties that are not recommended to modify the order and do not need to be set may not be written, but font-size and font-family must be specified, otherwise they will not work

# Line height

Line height controls the upper and lower distance between text and text (line spacing).

Line-height: valu

The value is in pixels

* * Tip: if you set the height of the label to the same height as the row height, the text in the label can be centered vertically in the tag

The combination of the two can center the single-line text horizontally and vertically inside the label.

This is the end of the content of "the setting method of CSS font font". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report