CSS 文本
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <link rel="stylesheet" type="text/css" href="css_font.css"/> </head> <body> <h1>这是标题 1</h1> <p>这是一段普通的段落。请注意文本为蓝色。页面的默认文本颜色在 body 选择器中定义。</p> <p>另一段文本。</p> <div id=""> In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since. 'Whenever you feel like criticizing anyone,' he told me, 'just remember that all the people in this world haven't had the advantages that you've had.' </div> <p class="p1"> this is p </p> </body> </html>
body{ color: aqua; } h1{ color: greenyellow; text-align: center; } div{ width: 300px; /* 拉伸每一行,以使每一行具有相等的宽度 */ text-align: justify; /* 垂直对齐 */ vertical-align: top; /* 文本装饰 none 默认。定义标准的文本。 用于删除连接的下划线 underline 定义文本下的一条线。 overline 定义文本上的一条线。 line-through 定义穿过文本下的一条线。 blink 定义闪烁的文本。*/ text-decoration: none; /* 文本转换 */ text-transform: uppercase; /* 首行缩进 */ text-indent: 50px; /* 字母间距 */ letter-spacing: 3px; /* 行高 */ line-height: 1.0; /* 字间距 */ word-spacing: -5px; /* 元素空白处理 nowrap 不换行 */ white-space: nowrap; /* 文字阴影 水平 垂直 模糊效果 颜色 */ text-shadow: 2px 2px 5px red; } .p1{ /* ltr 默认。文本方向从左到右。 rtl 文本方向从右到左。 */ direction: rtl; /* unicode-bidi: bidi-override; */ }
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律