Home  >  Article  >  Web Front-end  >  How to make fonts tilt in css

How to make fonts tilt in css

WBOY
WBOYOriginal
2021-12-06 10:22:4121231browse

In CSS, you can use the "font-style" attribute to make the font appear oblique. This attribute is used to define the style of the font. When the value of the attribute is "oblique", the element will be displayed in an oblique font style. , just add the "font-style:oblique" style to the text element.

How to make fonts tilt in css

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

How to tilt the font in css

In css, you can use the font-style attribute to tilt the font. This attribute is set to use 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.

The example is as follows:

<!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>Document</title>
    <style>
    p{
        font-style:oblique;
    }
    </style>
</head>
<body>
    <p>这是一段倾斜的文字</p>
</body>
</html>

Output result:

How to make fonts tilt in css

##(Learning video sharing:

css video tutorial

The above is the detailed content of How to make fonts tilt 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