【发布时间】:2017-12-07 11:05:59
【问题描述】:
.rq-search-container {
position: relative;
width: 100%;
background: white;
display: flex;
flex-direction: row;
align-items: flex-start;
border-radius: 2px;
z-index: 30;
-webkit-flex: 1 0 15em;
}
它在 chrome、Mozilla 浏览器中完美运行,但在 Safari 浏览器中无法运行。
我已经尝试了很多方法,例如 -web-kit-flex 等,但没有奏效。 请推荐我!
【问题讨论】:
-
尝试添加
display:-webkit-flex -
供应商前缀 css 属性应该写在标准 css 属性之上。
-
如果您每天都在编写 CSS,Autoprefixer 是必不可少的(带有 Browserslist 配置)。您不必关心这些前缀,也不会能够忘记一个(或添加一个不必要的或从未存在的),以非功能顺序编写,必须删除当您不支持某些(现在)旧浏览器等时手动需要一些工具,但有这么多开发人员使用它的原因^^
标签: javascript html css safari flexbox