ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## 字体颜色 ~~~css color:#008000; ~~~ <br> ## 字体大小 ~~~css // 字体大小设置 大小+单位 font-size: 50px; ~~~ <br> ## 字体 ~~~css /* 主流浏览器一般默认微软雅黑 */ font-family: 微软雅黑; font-family: 黑体; font-family: 宋体; ~~~ <br> ## 字体粗细 ~~~css /* 字体加粗 */ font-weight: bold; /* 字体不加粗 */ font-weight: normal; ~~~ <br> ## 文本修饰 ~~~css /* 下划线 */ text-decoration: underline; /* 删除线 */ text-decoration: line-through; /* 没有线 */ text-decoration: none; ~~~ <br> ## 斜体 ~~~css font-style: italic; ~~~ <br> ## 行高 ~~~css /* 一行内容的高度,内容不够高度,上下留白,内容居中 */ line-height: 40px; ~~~ <br> ## 首行缩进大小 ~~~css text-indent: 40px; ~~~ <br> ## 单词间距 ~~~css word-spacing: 40px; ~~~ <br> ## 字母间距 ~~~css /* 字母间距 */ letter-spacing: 40px; ~~~ <br> ## 文本对齐 ~~~css /* 左对齐 */ text-align: left; /* 右对齐 */ text-align: right; /* 居中 */ text-align: center; ~~~ <br> ## 强制不换行 ~~~css /* 强制文字不换行 */ white-space: nowrap; ~~~ <br> ## 关于空格的认知 不管你代码里有多少空白空格,浏览器最多只会解析一个空格 <br> <br>