今ポップアップを作っているのですが
display:flexを指定している要素の子要素にposition:absoluteを指定した時
その子要素がmargin:0 autoのように真ん中に来てくれません。
この現象が起きるブラウザ
iPhone6のsafari10.0.3やChrome
以下詳細のコードとなっています。
css
1.popup-wrap { 2 display:flex; 3 overflow:scroll; 4 position: fixed; 5 background-color: rgba(255, 255, 255, 0.99); 6 height: 100%; 7 width: 100%; 8 -webkit-box-align: center; 9 -ms-flex-align: center; 10 align-items: center; 11 -webkit-box-pack: center; 12 -ms-flex-pack: center; 13 justify-content: center; 14 top: 0; 15 left: 0; 16 z-index: 999; 17} 18 19.popup-contents{ 20 position:absolute; 21 width:90%; 22} 23 24
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/02/08 23:37
2017/02/09 00:25
2017/02/12 04:48