How css3 changes fonts
Editor to share with you how to change the font of css3, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!
In css, you can use the "font-family" attribute to change the font, which is used to specify the font of the element, simply by adding "font-family:" font name; "style to the element.
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
You can use the font-family property to change fonts in css.
Font-family specifies the font family of the element.
Font-family can save multiple font names as a "fallback" system. If the browser does not support the first font, the next one will be tried. That is, the value of the font-family attribute is a priority table of the font family name or / and class family name used for an element. The browser uses the first value it can recognize.
There are two types of font family names:
Specified series name: the name of the specific font, such as "times", "courier", "arial". Common font family names: for example: "serif", "sans-serif", "cursive", "fantasy", "monospace".
Let's take a look at the specific operation of this attribute through an example, as follows:
Document. One {font-family: "italics";} how to change the font style
Output result:
Add "font-family:" Song style to the element, and output the result:
Add "font-family:" boldface; "style to the element, and output the result:
The above is all the content of the article "how to change fonts in css3". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!