How to implement css to prevent the font from tilting: first create an HTML sample file; then define a set of divs; and finally set the attribute "div_normal i{ font-style:normal}" to prevent the text from tilting.
The operating environment of this tutorial: windows7 system, css3 version, thinkpad t480 computer.
Recommended: "css Video Tutorial"
The font-style attribute is compatible with major browsers and is used to set the display style of text. Use font-style:normal to prevent text from being slanted.
Value:
normal: normal font
italic: italic. For special fonts without italic variables, oblique
oblique will be applied: italic font
Below, we set the text font in the div box to italic italic, oblique italic, using font- style:normal removes the default italic style of the htmlitalic tag.
1. css code:
2. HTML code snippet:
我被加斜体我被加倾斜我加I标签斜体I斜体被CSS去掉
3. Effect
##
The above is the detailed content of How to prevent font tilt in css. For more information, please follow other related articles on the PHP Chinese website!