我正在使用display: flexbox
为一个div容器组合一些正方形(以使它们水平对齐),它在Chrome中工作正常,但在Safari 8.0中没有,它在这里被删除了:
#grid {
overflow-x: hidden;
overflow-y: scroll;
position: absolute;
top: 55px;
left: 415px;
bottom: 10px;
right: 10px;
display: flex;
justify-content: space-between;
flex-direction: row;
flex-wrap: wrap;
}
.square {
width: 166px;
height: 185px;
position: relative;
cursor: pointer;
background-size: 166px 125px !important;
background-repeat: no-repeat !important;
background: #FFF;
margin-right: 20px;
float: left;
}
答案 0 :(得分:3)
你需要使用前缀,所以safari支持
#grid {
overflow-x: hidden;
overflow-y: scroll;
position: absolute;
top: 55px;
left: 415px;
bottom: 10px;
right: 10px;
display: flex;
justify-content: space-between;
flex-direction: row;
flex-wrap: wrap;
display: -webkit-flex;
-webkit-justify-content: space-between;
-webkit-flex-direction: row;
-webkit-flex-wrap: wrap;
}