css斜体样式怎么写


本文摘自PHP中文网,作者醉折花枝作酒筹,侵删。

在css中,可以使用“font-style”属性来实现文字斜体样式,语法“font-style:italic|oblique”,其中italic是斜体样式,oblique是倾斜样式。

本教程操作环境:windows7系统、CSS3&&HTML5版、Dell G3电脑。

CSS设置文字斜体

斜体文字是人们经常用到的。CSS中斜体通过设置font-style属性来实现。

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

<span style="font-size:24px;"><html>

    <head>

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

    </head>

         

    <body>

        <h1>文字<span>斜</span>体</h1>

        <p class="one">文字斜体</p>

        <p class="two">文字斜体</p>

    </body>

</html>

</span>

5A)][$4FI94U$3U9IZS)0BY.png

阅读剩余部分

相关阅读 >>

css里面的rgba有几个值

css怎么写

css圣杯布局和双飞翼布局的区别是什么?

css怎么设置超链接字体加粗效果

css是框架吗

css的属性分为什么类别

css如何使用!important规则?(代码示例)

css如何显示文字的上标和下标

css如何禁止选中页面内容

css如何让div成圆的

更多相关阅读请进入《css》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...