文本属性:
- text -align——指定文本的对齐方式
- text-decoration——规定文本修饰
- text-transform——控制文本的大小写
- text-indent——文本首行缩进
text -align——指定文本的对齐方式
- left——居左对齐,默认情况下
- right——居右对齐
- center——居中对齐
例:<p>段落段落</p>
p{
text-align: center;
}
text-decoration——规定文本修饰
- underline——下划线
- overline——上划线
- line-through——定义删除线
例:<p>段落段落</p>
p{
text-align: center;
text-decoration: overline;
}
text-transform——控制文本的大小写
- captialize——定义每个单词开头大写
- uppercase——全部字母大写
- lowercase——全部字母小写
例:<p>hello world</p>
p{
text-transform: uppercase;
}
text-indent——文本首行缩进
例: <p>段落段落</p>
p{
text-indent: 50px;
}
表格属性
- border——边框
- border-collapse——折叠边框
- width和height——表格的宽度和高度
- padding——表格填充
- backerground-color——表格背景颜色
border——边框
例:table>tr*3>td*5{表格}
table,td{
border: 1px solid blueviolet;
}
border-collapse——折叠边框
例:table>tr*3>td*5{表格}
table,td{
border: 1px solid blueviolet;
}
table{
border-collapse: collapse;
}
width和height——表格的宽度和高度
padding——表格填充
例:table>tr*3>td*5{表格}
table,td{
padding: 25px;
}
backerground-color——表格背景颜色
例:table>tr*3>td*5{表格}
table,td{
background-color: red;
}