Files
ClassContent/历届学生/熊坤/2019-03-12/笔记.txt
2024-09-27 02:06:13 +08:00

48 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

CSS属性学习:
font-size: 设置字体大小,用于显示文字的标签基本上都可以用
font-family: 设置字体的样式
font-weight: 设置字体的粗细,可选数值:http://www.w3school.com.cn/cssref/pr_font_weight.asp
line-height: 设置文字上下间距
color: 设置文字的颜色
opacity: 0 完全透明, 1 完全不透明,一般在在 0 ~ 1 之间取值
text-indent: 设置文本段落的首行缩进,具体缩进多少,根据实际情况定
text-align: 设置文本的对齐方式 left right center
text-shadow: 1 2 3 4
1: 影子X轴上的位置,正数表示X轴右侧,负数左侧
2: 影子Y轴上的位置,正数表示Y轴下面,负数上面
3:设置影子的模糊度,数值越大越模糊
4:影子的颜色
letter-spacing: 设置字与字之间的间距
background-color: 设置背景色
background-image:设置背景图片
background-repeat:设置背景图片怎么重复
1:repeat-x: 背景图像在横向上平铺
2:repeat-y:背景图像在纵向上平铺
3:no-repeat:背景图像不平铺
background-position 设置背景图在哪里显示
1: center
2: left
3: right
4:x y 取数值
background-attachment 设置背景图是否随页面的滚动
1:fixed 表示图片固定,不随文字滚动
实现文字超过部分用 ... 代替
overflow: hidden;
width: 231px;
white-space: nowrap;
text-overflow: ellipsis;
预习:
1:background-origin
2:background-size