【问题标题】:How to use pseudo selectors before::after in tailwindcss?如何在 tailwindcss 中使用伪选择器 before::after?
【发布时间】:2021-09-03 11:02:39
【问题描述】:

我很难在 Youtube 和 Google 上弄清楚这一点。看来这是我唯一能得到答案的地方。

【问题讨论】:

    标签: css-selectors pseudo-element pseudo-class


    【解决方案1】:

    目前 tailwindcss 没有像 before::after 这样的伪元素实用程序。 为此,您需要安装伪元素插件

     # for NPM
     npm install tailwindcss-pseudo-elements --save-dev
    
    # for Yarn
    yarn add tailwindcss-pseudo-elements -D
    

    然后您需要在tailwind.config.js 文件中添加一些行,
    为此请参考this

    【讨论】:

      猜你喜欢
      • 2015-02-08
      • 2012-05-31
      • 2018-12-26
      • 2016-12-25
      • 2019-03-24
      • 2016-06-26
      • 2020-03-28
      • 2019-10-01
      • 2011-10-08
      相关资源
      最近更新 更多