Home  >  Article  >  Web Front-end  >  How to write css italic style

How to write css italic style

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-04-13 11:13:356255browse

In CSS, you can use the "font-style" attribute to implement the italic style of text. The syntax is "font-style:italic|oblique", where italic is the italic style and oblique is the oblique style.

How to write css italic style

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

CSS setting text italics

Italic text is often used by people. Italics in CSS are achieved by setting the font-style attribute.

<span>
	
		<title>
			文字斜体
		</title>
		<style>
			h1{font-style:italic;}
			h1 span{font-style:normal;}
			p{font-size:18px;}
			p.one{font-style:italic;}
			p.two{font-style:oblique;}
		</style>
	
		
	
		<h1>文字<span>斜</span>体</h1>
		<p>文字斜体</p>
		<p>文字斜体</p>
	

</span>

How to write css italic style

The above code sets the text style to italic. However, adding the tag to the

tag will change the font that has been italicized. , and set it to the standard style.

Recommended learning: css video tutorial

The above is the detailed content of How to write css italic style. 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