0
Following code作品はオフ少しです:Safariでフレックスボックスコンテナの固定コンテンツを中心に置く方法は? 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の "display:flexbox"親の要素ですか?
うんスニペット
transform: translate
Updated codepen
、これは安い、有効な解決策のように見えます。私はSafariとChromeでこれがなぜ違うのだろうと思っています - それは意図的なもの(CSS仕様の解釈の違いなど)かバグだけですか? – shabunc
@shabunc Flexboxモデルでは変更されていますが、一部のブラウザではまだまだキャッチアップされていません。ここでは、徹底的な説明https://stackoverflow.com/questions/32991051/absolutely-positioned-flex-item-is-not-removed-from-normal-flow-in-firefox-ie1 ...同様に資格を与えるかもしれない重複して – LGSon