CSS文本

作者: 陈老板_ | 来源:发表于2017-08-30 20:15 被阅读5次

大小:
font-size <length> <percentage> <absolute-size> <relative-size>
字体:
font-family <family-name> 具体字体 <generic-family> 依赖于浏览器和系统字体
<generic-family> = serif | sans-serif
加粗:
font-weight normal bold
斜体:
font-style normal italic 斜体 oblique 强制倾斜
间距:
line-height normal 由浏览器决定 number length percentage

简写:font:style || weight,size,line-height?,font-family (|| ?为可选写)

改变颜色:
color:red;#ffffff;rgb(0,0,0)
transparents 全透明。

加阴影:
text-shadow : none | [<length> {2,3} (x轴,y轴偏移)&& <color>?]# (可以写多个shadow,如果length有三个值,第三个值是阴影的模糊半径)

下划线:
text-decoration :none | [underline || overline || line-through ]

一行文字不要换行后面显示...:
text-overflow :clip (默认值)| ellipsis 要配合 overflow:hidden ; white-space:nowrap;

定义鼠标形状:
cursor :
auto 自动处理
default 普通光标
none 消失
help 问号
pointer 手型
zoom-in 放大镜
zoom-out 缩小镜
move 箭头

强制继承:
inherit : 子类继承父类的值

相关文章

网友评论

      本文标题:CSS文本

      本文链接:https://www.haomeiwen.com/subject/kmvxjxtx.html