行高与字体简写
line-height = height,可设置单行文字垂直居中
line-height
默认值1.33
可设置100px 也可设置1/2/3等 2表示font-size*2
font: italic bold 50px/2 '微软雅黑';
字体大小/行高 字体
italic bold 不写默认是normal normal
文本样式
text-align:水平对齐方式
left 左对齐
right 右对齐
center 中间对齐
justify 两边对齐
vertical-align:垂直对齐方式
baseline 基线对齐
top 上对齐
bottom 下对齐
middle 中间对齐
text-decoration:
normal
underline 下划线
line-through 删除线
overline 上划线
/* 线粗细 样式 颜色 线的形状 */
text-decoration: 10px line-through red dotted;
white-space 设置网页如何处理空白
normal 默认
nowrap 不换行
pre 保留空白
text-overflow:文本展示不全的处理方式
clip 裁剪
ellipsis 展示...
设置文本最多展示3行,最后展示...
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
网友评论