In CSS, the italic style code is "font-style:italic;"; the "font-style" attribute is used to define the style of the font. When the value of this attribute is "italic", the displayed The font style is italic; the syntax is "text element {font-style:italic;}".
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
What is the italic style code in css
In css, you can use the font-style attribute to set the italic style, which is used to define the font Style, when the value of this attribute is italic, it means that the font style is italic.
This property sets the use of italic, italic or normal font. An italic font is usually defined as an individual font within a font family. Theoretically, the user agent can calculate an italic font based on the normal font.
Let’s take a look at the
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> <title>123</title> <style type="text/css"> p{ font-style:italic; font-size:30px; } </style> </head> <body> <p>这是一段斜体文字</p> </body> </html>
output result through an example:
(Learning video sharing : css video tutorial)
The above is the detailed content of What is the italic style code in css. For more information, please follow other related articles on the PHP Chinese website!