zoukankan      html  css  js  c++  java
  • CSS_字体属性

    1.字体

    font-family:"字体1", "字体2",……;
    /*从左到右依次选择用户电脑中的字体*/

    2.字体大小

    font-size: 100px;
    /*设置字体大小为100像素*/

    3.字体颜色

    /*rgb表示法:*/
    color:rgb(125,45,199);
    /*rgba表示法:a表示透明度,取值范围0-1*/
    color:rgba(255, 155, 55, 0.5);
    /*十六进制表示法*/
    color:#400080;
    /*单词表示法*/
    color:blue;

    4.字体样式

    font-style: italic;
    /*斜体,默认为normal正常
    */

    5.字体粗细

    font-weight: 900;
    /*设置字体粗细:数值(默认为400)*/
    font-weight:bolder;
    /*设置字体粗细:单词(更粗的默认为normal正常*/

    6.文本属性

    /*默认的:没有效果*/
    text-decoration: none;
    /*下划线*/
    text-decoration:underline;
    /*上划线*/
    text-decoration:overline;
    /*删除线*/
    text-decoration:line-through;

       缩进:

    /*段落缩进:2em,根据字体大小,缩进两个字体*/
    text-indent: 2em;

      行高:

    /*行高:行与行直接的距离,默认字体大小为16px,32px则为两倍间距,也可以用2em*/
    line-height: 32px;

      字间距:

    /*字间距:文字和文字直接的距离*/
    letter-spacing: 2px;
    /*调整英文单词直接的距离*/
    word-spacing: 10px;

       对齐方式:

    /*中心对齐*/
    text-align: center;
    /*左对齐(默认的)*/
    text-align: left;
    /*右对齐*/
    text-align: right;
  • 相关阅读:
    python中的反射
    ZOJ 3827 Information Entropy 水
    我的软考之路(七)——数据结构与算法(5)之查找
    nginx.conf 集群完整配置
    恼人的函数指针(二)
    C语言100个经典的算法
    spring事务心得积累
    Vue报错:OPTIONS 405 Method Not Allowed以及CORS跨域错误
    IDA脚本dump内存的示例
    lightProxy
  • 原文地址:https://www.cnblogs.com/wangdianchao/p/12505365.html
Copyright © 2011-2022 走看看