<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>
    body{
        font-family:"Arial",华文隶书;
        /*字体(分中文和英文,样式不通用,英文用Arial,中文用华文隶书)*/
        color:rebeccapurple;/*字体 颜色*/
    }
    h1{
        font-size:50px;/*字体大小*/
    }
    p{
        font-weight: 1000;/*字体粗细*/
    }
/*    第二种写法:*/
    body{
        font:oblique 50 10px "楷体";/*风格(斜体),粗细,大小,字体样式*/
    }
    /*首行缩进*/
    p{
        text-indent: 2em;
    }
    /*图片和文字水平对齐*/
    img,span{
        vertical-align: middle;
    }
    /*水平居中*/
    h1 {
        text-align: center;
    }
    /*垂直居中,当高度与字体高度相等时,垂直居中*/
    p{
        height: 50px;
        line-height: 50px;
    }
</style>
<body>
<h1>text-decoration可能的值如下:</h1>
<p>1、none:默认。定义标准的文本。</p>
<p>2、underline:定义文本下的一条线。</p>
<p>3、overline:定义文本上的一条线。</p>
<p>4、line-through:定义穿过文本下的一条线。</p>
<p>5、blink:定义闪烁的文本。</p>
<p><img src="../resources/image/1.jpg" alt="">
    <span>6、inherit:规定应该从父元素继承 text-decoration 属性的值。</span>    </p>
</body>
</html>

 

posted on 2022-07-10 01:11  阿霖找BUG  阅读(57)  评论(0)    收藏  举报