31

探秘 flex 上下文中神奇的自动 margin

 4 years ago
source link: https://juejin.im/post/5ce60afde51d455ca04361b1
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
为了引出本文的主题,先看看这个问题,最快水平垂直居中一个元素的方法是什么? 水平垂直居中也算是 CSS 领域最为常见的一个问题了,不同场景下的方法也各不相同,各有优劣。嗯,下面这种应该算是最便捷的了: <div class="g-container"&g

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK