首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

css 文字式样

2012-10-23 
css 文字样式css 通过 font-familyh2{font-family:黑体,幼圆}意思:如果有黑体就用黑体,幼圆有幼圆就用幼

css 文字样式

css 通过 font-familyh2{font-family:黑体,幼圆;}                                   意思:如果有黑体就用黑体,幼圆有幼圆就用幼圆       p{font-family:Arial, Helvetica, sans-serif;}意思:字体中没有Arial,就用Helvetica,没有sans-serif,都没有就用浏览器默认字体文字的颜色h2{ color:rgb(0%,0%,80%); }  //rgb(红0%,绿0%,蓝80%) p{    color:#333333;                    //数字控制方式    font-size:13px;}p span{ color:blue; }            //英文单词控制方式文字的粗细span.one{ font-weight:100; }span.two{ font-weight:200; }span.three{ font-weight:300; }   //100 200 300 文字粗细和文字大小基本没有什么区别h1 span{ font-weight:lighter;}  //font-weight 是定义文字粗细的 lighter 为正常文字,bold表示粗体normal,表示细体文字下划线,顶划线,删除线p.one{ text-decoration:underline; }            /* 下划线 */p.two{ text-decoration:overline; }            /* 顶划线 */p.three{ text-decoration:line-through; }    /* 删除线 */p.four{ text-decoration:blink; }            /* 闪烁 */文字斜体h1{ font-style:italic; }            /* 设置斜体 */h1 span{ font-style:normal; }        /* 设置为标准风格 */p{ font-size:18px; }p.one{ font-style:italic; }p.two{ font-style:oblique; }英文字母大小写p{ font-size:17px; }p.one{ text-transform:capitalize; }        /* 单词首字大写 */p.two{ text-transform:uppercase; }        /* 全部大写 */p.three{ text-transform:lowercase; }    /* 全部小写 */css 段落文字(段落水平对齐,垂直对齐,行间距,子间距,首字放大)td.top{ vertical-align:top; }            /* 顶端对齐 */td.bottom{ vertical-align:bottom; }        /* 底端对齐 */td.middle{ vertical-align:middle; }        /* 中间对齐 */垂直对齐<!--span.zs{ vertical-align:10px; }span.fs{ vertical-align:-10px; }-->首字下沉p span{    font-size:60px;                /* 首字大小 */    float:left;                    /* 首字下沉 */    padding-right:5px;            /* 与右边的间隔 */    font-weight:bold;            /* 粗体字 */    font-family:黑体;            /* 黑体字 */    color:yellow;                /* 字体颜色 */}字体间距p.one{    font-size:10pt;    letter-spacing:-2pt;    /* 字间距,绝对数值,负数 */}p.second{ font-size:18px; }p.third{ font-size:11px; }p.second, p.third{    letter-spacing: .5em;    /* 字间距,相对数值 */}行间距p.one{    font-size:10pt;    line-height:8pt;    /* 行间距,绝对数值,行间距小于字体大小 */}p.second{ font-size:18px; }p.third{ font-size:10px; }p.second, p.third{    line-height: 1.5em;    /* 行间距,相对数值 */}

热点排行