css笔记之css总结
css总结 文字属性 color可以定义字体颜色 font-size: 字体大小 font-weight:字体粗细 normal: 默认值,标准粗细 bold: 粗体 bolder: 更粗 lighter: 更细 100~900: 设置具体粗细,400等同于normal,而700等同于bold inherit: 继承父元素字体的粗细值 font-style: 字体风格 normal: 默认值,浏览器会显示标准的字体样式 italic: 浏览器会显示斜体的字体样式 oblique:浏览器会显示倾斜的字体样式 font-family: 字体 综合: {font:font-style font-weight font-size/line-height font-family;} 其他属性可以省略,必须保留font-size和font-family属性 外观属性 line-height:行间距 行间距=weight,可以设置水平居中 text-align:水平对齐方式 left 左对齐,默认值 right 右对齐 center 居中对齐 justify 两端对齐 text-decoration:文字装饰 none 默认。定义标准的文本 underline 定义文本下的一条线 overline 定义文本上的一条线 line-through 定义穿过文本下的一条线 inherit