原文链接: css 居中
上一篇: vue 路由
下一篇: vis 入门
子组件居中
<div class="container" style="background-color: black;width: 800px;height: 600px;">
<div class="container"
style="width: 200px;height: 100px;background-color: yellow;top:50%;position: relative;transform: translateY(-50%);">
<div class="container"
style="width: 40px;height: 20px;background-color: blue;top:50%;position: relative;transform: translateY(-50%);">
</div>
</div>
</div>