文本颜色color
以下为三种表示方式,一般用第二种
<style>
body {
color: red;
color: ff0000;
color: rgb(255, 0, 0);
}
</style>
文本对齐text-align
<style>
body {
text-align: left;/* 左对齐(默认对齐方式) */
text-align: right;/* 右对齐 */
text-align: center;/* 居中对齐 */
}
</style>
文本装饰text-decoration
<style>
body {
text-decoration: none;/* 没有装饰线(默认值) */
text-decoration: underline;/* 下划线 */
text-decoration: overline;/* 上划线 */
text-decoration: line-through;/* 删除线 */
}
</style>
文本缩进 text-indent
使文本第一行首行缩进多少距离
em指当前元素一个文字的大小,若一个字大小为12px,2em表示缩进两个字,即24px
<style>
body {
text-indent: 12px;
text-indent: 2em;
}
</style>
行间距line-height
<style>
body {
line-height: 26px;
}
</style>
初学者,见解不足,如有错误请指出