CSS 文本

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <link rel="stylesheet" type="text/css" href="css_font.css"/>
    </head>
    <body>
        <h1>这是标题 1</h1>
        
        <p>这是一段普通的段落。请注意文本为蓝色。页面的默认文本颜色在 body 选择器中定义。</p>
        
        <p>另一段文本。</p>
        <div id="">
            In my younger and more vulnerable years my father gave me some advice 
            that I've been turning over in my mind ever since. 'Whenever you feel like
             criticizing anyone,' he told me, 'just remember that all the people 
             in this world haven't had the advantages that you've had.'
        </div>
        
        <p class="p1">
                this is p
        </p>
    </body>
</html>
body{
    color: aqua;
}
h1{
    color: greenyellow;
    text-align: center;
}
div{
    width: 300px;
    /* 拉伸每一行,以使每一行具有相等的宽度 */
    text-align: justify;
    /* 垂直对齐 */
    vertical-align: top;
    
    /* 文本装饰 
    none    默认。定义标准的文本。 用于删除连接的下划线
    underline    定义文本下的一条线。
    overline    定义文本上的一条线。
    line-through    定义穿过文本下的一条线。
    blink    定义闪烁的文本。*/
    text-decoration: none;
    
    /* 文本转换 */
    text-transform: uppercase;
    
    /* 首行缩进 */
    text-indent: 50px;
    
    /* 字母间距 */
    letter-spacing: 3px;
    
    /* 行高 */
    line-height: 1.0;
    
    /* 字间距 */
    word-spacing: -5px;
    
    /* 元素空白处理 
        nowrap 不换行    */
    white-space: nowrap;
    
    /* 文字阴影 水平 垂直 模糊效果 颜色 */
    text-shadow: 2px 2px 5px red;
}
.p1{
    /* ltr    默认。文本方向从左到右。
    rtl    文本方向从右到左。 */
    direction: rtl;
    /* unicode-bidi: bidi-override; */
}

 

posted @ 2022-03-02 22:02  lwx_R  阅读(25)  评论(0编辑  收藏  举报