【问题标题】:Remove margin on column over certain breakpoint在某个断点上删除列上的边距
【发布时间】:2021-01-15 02:02:33
【问题描述】:

我正在尝试在 Tailwind 中实现类似于 Bootstrap 的布局,其中容器内的一列没有自动边距。引导程序中的 CSS 示例。谁能在 Tailwind 中提供类似的解决方法?

@media (min-width: 994px) {
    .section-full-width-right > .container > .row > .col-lg-6:last-child {
        position: absolute;
        left: 50%;
    }
  }

【问题讨论】:

    标签: tailwind-css


    【解决方案1】:
    @screen md {
      .section-full-width-right > .container > .row > .col-lg-6:last-child {
        @apply absolute left-half;
      }
    }
    

    并确保将 inset 属性更改为

    inset: {
      0: "0",
      auto: "auto",
      half: "50%"
    }
    

    在tailwind.config.js 文件中。

    【讨论】:

      猜你喜欢
      • 2014-02-27
      • 1970-01-01
      • 2012-01-17
      • 2023-01-11
      • 2014-09-14
      • 2018-05-04
      • 2017-02-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多