Safari has full support for FlexBox according to caniuse.絕對與Flexbox,就在Safari
定位,我只是想棧的不同大小的div的相互利用Flexbox的頂部。我是真的好奇,爲什麼這個工程在Chrome/Firefox中,但不是在Safari:
<div class="container">
<div class="inner-one"></div>
<div class="inner-two"></div>
</div>
.container {
width: 15rem;
height: 15rem;
border-radius: 50%;
background-color: blue;
display: flex;
align-items: center;
justify-content: center;
}
.container div {
position: absolute;
}
.inner-one {
width: 13rem;
height: 13rem;
border-radius: 50%;
background-color: green;
}
.inner-two {
width: 11rem;
height: 11rem;
border-radius: 50%;
background-color: purple;
}
見的jsfiddle這裏:https://jsfiddle.net/19n95exf/3/
你曾經通過-webkit前綴試過嗎? – sol