【发布时间】:2018-01-14 18:21:53
【问题描述】:
Following code 在 Chrome 和 Firefox 中按预期工作(块居中),但在 Safari 中子容器略有偏离:
#container {
width: 100%;
background: yellow;
height: 20px;
position: absolute;
top: 0;
left: 0;
display: flex;
justify-content: center;
}
#content {
padding: 0px;
background: linen;
position: fixed;
}
我的问题是 - 如何在 Safari 的“显示:flexbox”父级中居中“位置:固定”元素?
【问题讨论】:
标签: css safari flexbox css-position