css 居中

原创
2017/10/25 12:41
阅读数 24

 

原文链接: 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>

 

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部