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 @   lwx_R  阅读(29)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
点击右上角即可分享
微信分享提示