zoukankan      html  css  js  c++  java
  • 字体和文本

    字体

    字体

    p{
        font-family: '宋体';
    }
    

    字体大小

    font-size: 30px;
    

    字体粗细

    font-weight:bold;
    

    字体样式

    /* normal italic */
    font-style:italic;
    

    颜色

    /* color */
    color:red;
    /* 
    表示方法:
        英文单词
        十六进制 #eee #fff 每两位表示一个颜色,同时两两相同的可以缩写
        rgb三原色表示(取值均在0-255之间)
        hsl
     */
    

    简写

    /* 
    顺序:
    font-style样式italic
    font-weight 
    font-size/line-height
    font-family 
    */
    /* font 一定要写:font-size font-family */
    font:italic 20px  "宋体";
    

    文本

    text-decoration 装饰

    <!-- 
        文本修饰
        取值:
            none 默认值
            underline:下划线
            overline:上划线
            line-through:穿过的线
     -->
    <div>有一条线</div>
    
    div{
        text-decoration: underline;
    }
    

    首行缩进

    text-indent:2em;
    /* em是长度单位和我们的px相同
        px是固定的像素
        em和rem相对于px更具有灵活性,他们是相对长度单位,意思是长度不是定死了的,更适用于响应式布局。
        em相对于父元素,rem相对于根元素
     */
    

    行高

    /* 设置我们段落行间距为xxx倍 */
    line-height: 2em;
    

    文本对齐方式

    /* text-align实现文本居中显示 */
     text-align: center;
    
  • 相关阅读:
    vnc安装
    centos下安装图形界面
    granfana telegraf influx安装与使用
    jenkins安装与使用
    yum使用手册
    Python模块--并发相关threading、multiprocessing、Queue、gevent
    Python模块--logging
    Python模块--psutil
    python模块--Beautifulsoup
    Python模块--Pexpect
  • 原文地址:https://www.cnblogs.com/Calculus9/p/14610785.html
Copyright © 2011-2022 走看看