20170922文本属性

来源:互联网 发布:三国群英传ol 知乎 编辑:程序博客网 时间:2024/06/04 20:05

1. /*行内样式>id选择器>类选择器>标签选择器:1000>100>10>1*/

2.<!--命名规则:包括数字、字母、下划线、$,但是不能以数字开头。-->

3:

<style>    p{        color:red;/*字体颜色*/        font-weight: bold;/*字体粗细*/        font-size: 20px;/*字体大小*/        font-family: 宋体;/*字体系列*/        font-style: italic;/*字体样式,italic为斜体*/        opacity: 0.6;/*透明度:1为不透明、0为透明*/    }</style>
4:
<style>    p{        height: 50px;/*段落高度*/        background-color: red;        line-height: 50px;/*文本行高*/        text-align: center;/*文本在水平方向的位置,当值为justify时,文本对齐方式为两端对齐、center:居中、right:右对齐*/        letter-spacing: 10px;/*字符间距*/        text-decoration: underline;/*文本修饰线出现的位置。underline:下划线、overline:上划线、line-trhoth:中划线*/        text-decoration-color: white;/*文本修饰线的颜色*/        text-decoration-style: dotted;        /*文本修饰线的样式。solid:实线、dotted:点状线、wavy:波浪线、dashed:虚线、double:双线*/    }</style>

原创粉丝点击