1. 程式人生 > >關於文字樣式的簡單介紹

關於文字樣式的簡單介紹

#text{
    color: red;/*字型顏色*/
    opacity: 0.5;/*1:不透明;0:全透明*/
    font-style: italic;/*字型風格*/
    font-weight: bolder;/*字型粗細*/
    font-size: 40px;/*字型大小*/
    line-height: 60px;/*字型行高*/
    font-family: 微軟雅黑 sans-serif;/*字體系列*/
    /*複合屬性(順序!!):等效於前五個屬性(複合屬性效率高)*/
    font:italic bold 40px/1.5 宋體 微軟雅黑 sans-serif;
}
#text{
    height: 30px;
    background-color: red;
    text-align: center; /*文字水平對齊方式*/
    line-height: 30px;/*行高,通常設定文字垂直方向的對齊方式*/
    letter-spacing: 10px;/*文字間距*/
    /*
    overline:上劃線
    line-through:中劃線
    underline:下劃線
    */
    text-decoration: underline;/*文字修飾*/
    /*
    wavy:波浪線
    dashed:間隔線
    dotted:點狀線
    solid:單實線
    double:雙實線
    */
    text-decoration-style: wavy;/*文字修飾的樣式*/
    text-decoration-color: #ff7300;/*文字修飾的顏色*/
}