Home  >  Article  >  Web Front-end  >  What is the italic style code in css

What is the italic style code in css

WBOY
WBOYOriginal
2021-11-29 15:40:256332browse

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;}".

What is the italic style code in css

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.

What is the italic style code in css

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:

What is the italic style code in css

(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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn