在Safari中显示Flex对齐

时间:2019-01-21 22:20:18

标签: html css css3 safari flexbox

我有div块,里面有一个子元素:

.mark__btn {
  width: 19px;
  height: 19px;
  border-radius: 2px;
  cursor: pointer;
  text-align: center;
  opacity: 0.8;
  position: relative;
  margin-right: 3px;
  color: #000;
  display: flex;
  align-items: center;
  align-content: center;
  flex-direction: column;
  justify-content: center;
  align-self: center;
}

.mark__btn span {
  font-size: 14px;
}
<div class="mark__btn">
  <span>+</span>
</div>

因此,我尝试通过水平和垂直方向将居中元素span对齐,它可与Chrome一起使用,但不能在Safari中使用

1 个答案:

答案 0 :(得分:0)

您需要为Safari和其他浏览器使用前缀才能使用display flex

19  27733067    .   A   G,C .   clustered_events;contamination;germline_risk;multiallelic   DP=60;ECNT=15;POP_AF=1.000e-03,1.000e-03;P_GERMLINE=-2.169e-04,-2.325e-04;TLOD=11.46,7.14   GT:AD:AF:DP:F1R2:F2R1:MBQ:MFRL:MMQ:MPOS:SA_MAP_AF:SA_POST_PROB  0/1/2:5,35,20:0.500,0.333:6:0,2,1:1,1,1:34,35:112,143,117:42,45:29,47:0.444,0.485,0.500:0.037,0.019,0.944
92,0.253,0.263:0.038,0.014,0.948