CSS样式-文字对齐方式及修饰

水平方向:

text-align:设定内容在盒子中的对齐方式(即块级元素中的行内元素居中的方式)

      left,center,right

垂直方向:

line-height:设定行高,一般来说,比字体大7/8px

 

文字居中:

  水平方向: text-align: center

  垂直方向: line-height  设定成和容器一样高

 

text-indent:文字缩进,使用的单位是em

 

text-decoration: 修改文字的修饰

  none:什么都没有;

  underline:下划线;

  overline:上划线;

  line-through:删除线

posted @ 2021-02-19 19:02  #Friday  阅读(850)  评论(0)    收藏  举报