说明
本文的“文本”相关属性控制的是整段、整个div内文本的显示效果,包括文本文字的缩进、段内文字的对齐方式、文本中空白字符的处理等等,需要掌握。
网页源码
文本属性
div {
border:1px solid #000000;
height: 80px;
width: 200px;
}
text-indent:20pt
text-indent:40pt
text-align:left
text-align:center
text-align:right
text-align:justify
direction:rtl
direction:ltr
overflow:hidden;white-space:nowrap;text-overflow:clip;
overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
white-space : normal
white-space : normal
white-space : pre
white-space : pre
white-space : nowrap
white-space : nowrap
white-space : pre-wrap
white-space : pre-wrap
white-space : pre-line
white-space : pre-line
white-space : inherit
white-space : inherit
word-break:normal
word-break:normal
word-break:keep-all
word-break:keep-all
word-break:break-all
word-break:break-all
aaaaaaaaaaaaaaaa https://blog.csdn.net/weixin_43896318
aaaaaaaaaaaaaaaa https://blog.csdn.net/weixin_43896318
网页展示
建议使用Chrome浏览器查看,因为Firefox浏览器对这里有些功能不支持……真的……