【问题标题】:CSS | grid-auto-columns: min-content | not working in IOS 10.3.3CSS |网格自动列:最小内容 |在 IOS 10.3.3 中不工作
【发布时间】:2017-08-16 03:23:27
【问题描述】:

是否有任何替代品,或者我应该恢复浮动并等待支持到达?

.grid_root {
  display: grid;
  grid-column-gap: 1px;
  grid-auto-flow: column;
  grid-auto-columns: min-content;
}

示例(在手机中使用全屏预览): https://plnkr.co/edit/c6Znq3rtEfQK0Ky1wugt?p=preview

【问题讨论】:

    标签: ios css safari css-grid


    【解决方案1】:

    尝试使用 webkit 前缀。在我的 iPad 上的 Safari 上工作。

    .grid_root {
      display: grid;
      grid-column-gap: 1px;
      grid-auto-flow: column;
      grid-auto-columns: -webkit-min-content; /* new */
      grid-auto-columns: min-content;
    }
    

    revised demo

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-06-08
      • 2019-05-11
      • 2020-07-21
      • 1970-01-01
      • 2021-10-27
      • 2020-03-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多