Code example of defining font italic style using font-style in CSS

不言
Release: 2018-11-27 16:34:10
forward
4060 people have browsed it

The content of this article is about the code example of defining the font italic style in CSS with font-style. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

1. Commonly used italic syntax

Common font style settings font-style: italic

Compatible with major browsers

normal : Normal font (default font style, can be used to remove the default italic style of html i italic tag)

italic : italic. For special fonts without italic variables, oblique

oblique will be applied: oblique font

2. CSS italic case

We set the text font in the divcss5 box to italic italic and oblique italic, and use font-style:normal to remove the default italic style of the html italic tag.

1, css code:

<style>
  .divcss5_italic{ font-style:italic}
  .divcss5_oblique{ font-style:oblique}
  .divcss5_normal i{ font-style:normal}
  / 去掉divcss5_normal对象I斜体标签默认斜体样式 /
  </style>
Copy after login

2, html code snippet:

<div class="divcss5_italic">我被加斜体</div>
  <div class="divcss5_oblique">我被加倾斜</div>
  <div>我加I标签斜体</div>
  <div class="divcss5_normal">I斜体被CSS去掉</div>
Copy after login

3, div css italic case screenshot

CSS font-style italic font italic style (italic oblique normal)

3. Summary

Let the text font in the object box be italic, and you can add it to the corresponding box The css style font-style:italic can realize the text font in the object to be italic. At the same time, our case also demonstrates using CSS to remove the italic style, and using CSS font-style:normal to remove the italic style of the I italic tag.

The above is the detailed content of Code example of defining font italic style using font-style in CSS. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:segmentfault.com
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template