css:
字体:
font-size 字体大小
font-weight 字体粗细
fon-style 字体样式
font-family 设置字体
盒子阴影:
box-shado: 水平, 垂直, 模糊距离, 尺寸, 颜色
文字阴影:
text-shadow: 水平, 垂直, 模糊距离, 尺寸, 颜色
圆角边框:
border-radius:
文本:
color 文本颜色
text-align 文本对齐方式
line-height 行间距
text-decoration 文本装饰 (上划线)(下划线)(删除线)
背景:
background-color 背景颜色
backgroun-image: url() 背景图片background-repeat: no-repeat reapeat-x reapeat-y背景平铺设置‘
backgrund-position 背景位置 方位名 和精单位
如是方位名词 没有位置顺序 left top right center bottom
background: rgda(0,0,0,0.3) 背景半透明
精确单位(px): 第一个参数是 x 轴 第二个是 y 轴
backgroun-attachment : fiex(固定) scroll(滚动) 背景附着
background-size: 宽 高 参数 conain 把图片放到最大
盒子模型:
box-szing: border-box 这样据不会撑大盒子
结构伪类选择器(之一):
nth-child:
设置图片和文字居中位置
vertical-align:middle (中线对齐)
文本溢出:
单行:
white-space: nowrap 强制一行
overflow: hidden 超出部分隐藏
text-overflow: ellipsis 单行文本超出部分用省略号代替
多行:
overflow: hedden
text-overflow: ellipsis
display: -webkit-box
-webkit-ine-clamp: 在几行
-webkit-box-orient: vertical
过渡(让变化具有动画效果):
transition:
2D转换: 配和 transition 过渡
transfrom:rotate( deg) 旋转度数
transfrom-orgin:x,y; 设置转换的中心点 方位名词 和 px单位
transfrom: scale(x,y) 缩放效果 1, 1 放大一倍。 0.5, 0.5 :缩小
transfrom:translateX() translateY() translate()
动画:
animation-name: 指定动画名称
animation-duration: 持续时间
liner 匀速
infinie 循环
animation-delay 延迟 s
@keyframes 动画名称 {
0% {
width: 100px
}
100% {
width: 200 px
}
}
0% 开始 100%结束