font-family:设置字体。比如 font-family:"Microsoft Yahei"。
font-weight:字体粗细,属性值:normal、bold、bolder、lighter、100~900
line-height:行间距、
text-indent:首行缩进
letter-spacing:字间距
word-spacing:单词间距
cursor鼠标样式
CSS引入格式:<link href="CSS文件的路径" type="text/CSS" rel="stylesheet" />
内边距 padding 和外边距 margin 边框 border
content
background-sizi:
background-image 背景图片地址
background-repeat 是否平铺
background-position
display: bolck、inline-block;
text-align: center; 文字水平居中
line-height: 文字垂直居中
text-decoration: none; 文本装饰
list-style: none;取消ul ol 远点
border-radius: 左上角 右上角 右下角 左下角
清楚浮动
clear:both;
overflow: hidden
after { content: "."; display: block; clear: both; visibility: hidden; }
position; relative 相对定位 absolute 绝对定位 fixed 固定定位
visibility 可见性,overflow 溢出
vertical-align 垂直对齐:baseline 、 top 、 middle 、bottom
过度:
transition: 要过渡的属性 花费时间 运动曲线 何时开始;
transition: all 0.6s; 后面俩个属性可以省略
2D变形(CSS3) transform;rotateX() rotateY()rotateZ()就是沿着 X 、Y、Z立体旋转
动画(CSS3) animation
animation:动画名称 动画时间 运动曲线 何时开始 播放次数 是否反方向;
@keyframes 动画名称 {
from{ 开始位置 } 0%
to{ 结束 } 100%
}
CSS3常用属性
最新推荐文章于 2020-03-12 11:25:31 发布