【问题标题】:Is there a way to set content with Tailwind css?有没有办法使用 Tailwind css 设置内容?
【发布时间】:2021-12-27 08:21:33
【问题描述】:

我必须将一些样式从 css 更改为顺风,但一条规则似乎是不可能的。

例如,具有在有序列表的元素之间添加/ 的以下规则。

.breadcrumb ol li:not(:last-child)::after {
  content: '/';
}

顺风能做到吗? documentation 里面有东西但是好像太复杂了。

【问题讨论】:

  • 是什么阻止您添加自己的将content: 设置为::after 的样式规则?

标签: css css-selectors tailwind-css


【解决方案1】:

您需要启用JIT 模式

那你就可以了

<div class="before:content-['/'] before:block ...">

Here's the link to the docs

【讨论】:

    猜你喜欢
    • 2022-09-24
    • 2012-10-19
    • 2021-09-23
    • 2021-04-01
    • 2012-03-09
    • 2012-09-09
    • 1970-01-01
    • 2021-09-01
    • 1970-01-01
    相关资源
    最近更新 更多