码迷,mamicode.com
首页 > Web开发 > 详细

CSS 文本样式

时间:2018-09-11 23:53:45      阅读:269      评论:0      收藏:0      [点我收藏+]

标签:居中   ext   微软   lin   enter   mil   round   删除线   class   

1. 文本样式 text

<!--文本颜色color    -->
.text {color:red;}

2. 文本对齐方式    text-align

<style>
    .text {
        text-align:left;/*向左对齐*/       
    }
    .text {
        text-align:center;/*居中*/
    }
    .text {
        text-align:right;/*向右对齐*/
    }
    .text {
        text-align:justify;/*两端对齐*/
    }
</style>

3. 文本修饰   text-decoration

.decoration {
        text-decoration:none;/*默认样式*/
    }
.decoration {
        text-decoration:overline;/*上划线*/
    }
.decoration {
        text-decoration:underline;/*下划线*/
    }
.decoration {
        text-decoration:line-through;/*删除线*/
    }

4. 字体 font

.text {
        font-family:"微软雅黑";/*字形 微软雅黑*/
        font-size:10px;/*字体大小 10像素*/
        font-style:italic;/*字体样式 斜体 */
        /*字体样式还有
              normal 正常的 
              oblique 倾斜体
        */
    }    

 

CSS 文本样式

标签:居中   ext   微软   lin   enter   mil   round   删除线   class   

原文地址:https://www.cnblogs.com/zhoumao/p/9631484.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!