弹性布局flex
body {
display: flex;
align-items: center; /定义body的元素垂直居中/
justify-content: center; /定义body的里的元素水平居中/
}
.content {
width: 300px;
height: 300px;
background: orange;
}
弹性布局flex
body {
display: flex;
align-items: center; /定义body的元素垂直居中/
justify-content: center; /定义body的里的元素水平居中/
}
.content {
width: 300px;
height: 300px;
background: orange;
}