HTML基础学习-16-text文本相关属性设置
<!DOCTYPE html>
<!--
text-align: left right center 横向排列
line-height: 文本行高 基于 文本 font-size大小,设置至少比font-size 大,不然会有重复
可以设定百分比 大小基于 font-size 行高百分比 一般大于100%,不然会重叠吧
text-indent 首行缩进 按照容器宽高来决定
letter-spacing: 空出字体间距离 字符之间间距 normal 默认值 可以是具体px数值 inherit继承
可以为负数
word-spacing 单词间距 normal px inherit 英文的
direction 文本方向 lfr 从左到右侧 rtl从右侧到左
text-transform 文本大小写
capitalize 每个单词大写字母开头
uppercase 定义仅有大写字母
lowercase 定义仅有小写字母
inherit
-->
<head>
<title>文本属性</title>
<meta charset="utf-8">
<style type="text/css">
div{
width:1000px;
height:300px;
}
p{
text-align:center;
font-size:20px;
line-height:80%;
letter-spacing:40px
}
.pa{
text-align:center;
font-size:20px;
word-spacing:80px;
direction:rtl;
text-transform:uppercase;
}
</style>
</head>
<body>
<div>
<p>
文本内容啊啊啊啊啊
ASD啊是的ASD
</p>
<p class="pa">
wen ben eiro
</p>
</div>
</body>
</html>
跟随视频学习,手写记录自己学习过程中的点点滴滴,一起加油吧。