// 1.父盒子中水平、垂直居中
// 2.数组操作及返回值
// 3.简述vue生命周期 操作dom在哪个节点 beforeDestroy进行了什么
// 4.如何父子传值
// 5.vue中的延迟回调:Vue.nextTick( )
// 6.vuex 中如何改变state值
<div class="parent">
<div class="child"></div>
</div>
.parent {
width: 200px;
height: 200px;
background-color: red;
}
.child {
width: 100px;
height: 100px;
background-color: green;
}
/* 1. postion定位 */
/* .parent{
position: relative;
}
.child{
position: absolute;
top:50%;
left: 50%;
transform: translate(-50%,-50%)
} */
/* 2. flex布局 */
/* .parent {
display: flex;
justify-content: center;
align-items: center;
} */
/* 3. flex + margin */
.parent {
display: flex;
}
.child {
margin: auto;
}