JavaEE - CSS font styles

Disclaimer: The materials used in this column are written by VIP students of Kaige Academy. Students have the right to remain anonymous and have the right to final interpretation of the article. Kaige Academy aims to promote VIP students to learn from each other based on public notes.

CSS font style

With CSS style sheets, fonts can be customized. Download the desired font library, then create a directory in the project to store the font library files, store the downloaded font library files in it, and then you can reference the font library in this directory, and use @font-face to customize the font Library, for example, I downloaded a Mao Zedong font, then created a font directory in the project, and put the font library file into it:

image

Tip: If you are doing experiments and exercises, you can download some various font libraries to use, but if it is on a personal website or other public website, do not use these without the authorization of a non-free font font, so as not to cause infringement.

Code example:

image

operation result:

image

font-weight:bold Set the font to bold, font-weight has many properties, but the more commonly used is bold, code example:

image

operation result:

image

text-shadow sets the shadow part of the font, the format is: npx npx npx color, text-align sets the layout of the font, commonly used attributes are center (center), left (aligned to the left), right (aligned to the right), code example :

image

operation result:

image

text-decoration Set the font horizontal line, you can set the font's underline, overline, midline and remove the horizontal line, etc., for example, you can remove the underline of hyperlinks, code example:

image

operation result:

image

mind Mapping:

image

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326886006&siteId=291194637