1、文字垂直居中
align-items: center;
2、元素长宽包含内边距外边距
box-sizing: border-box;
3、根据子元素所有的div大小自适应宽度和高度
display: inline-flex;
4、弹性盒对象的 <div> 元素中的各项周围留有空白
justify-content: flex-end;
5、将对象作为弹性伸缩盒显示
display: flex;
6、给div元素添加圆角的边框
border-radius:25px;
7、在弹性盒对象的 <div> 元素中的各项周围留有空白
justify-content: space-between
8、背景图片居中显示
background-repeat: no-repeat;
background-size: cover;
9、div垂直居中
1、
width: 100px;
height: 100px;
margin: 0 auto;
position: relative;
top: 50%; /*偏移*/
transform: translateY(-50%);
2、
body {
display: flex;
align-items: center; /*定义body的元素垂直居中*/
justify-content: center; /*定义body的里的元素水平居中*/
}
10、css 文字图片垂直对齐
vertical-align: middle;
11、el-table表头居中
:header-cell-style="{'text-align':'center'}"
12、div鼠标放上去会变成小手样式
cursor:pointer;
13、子元素换行后设置上下间距
align-content: flex-start;
显示
(持续更新中.......)