javascript - 如何在 nuxt.js 中申请 TailwindCss 活动样式?
问题描述
最近我尝试使用 Vuetify.js 的 tailwindCss 作为 Nuxt.js UI 框架。我真的做了一个像按钮这样的简单示例,但它没有达到我的预期。我想添加“活动”实用程序,但它不起作用。
我跟着那个。 所以首先,我像这样添加tailwind.config.js。
tailwind.config.js
module.exports = {
variants: {
extend: {
backgroundColor: ['active'],
},
},
}
我制作了我的小按钮示例,如下所示。
<button
class="
active:bg-green-700
bg-green-500
rounded
font-bold
py-3
px-5
text-white
"
>
ButtonTest
</button>
我运行了这些代码,按钮从未激活。是否需要使用其他设置?请问有人给我建议吗?
解决方案
推荐阅读
- html - 导航中边框元素周围的空白?
- html - 引导程序 5 | img 大小响应“card-img-top”
- python - 为什么我不能在 Windows 7 上使用 Tensorflow?
- node.js - 从 nodejs 提供图像和静态内容
- sql - SQL 服务器。T-SQL。CASE IF EXISTS 查询
- javascript - 地点搜索框 - 通过 .click() + .click() 在第一个结果上打开建议
- servicenow - 采购 SCTASK - 保存内部源请求 UI 操作
- toast - SAP Cloud Application Programming Model CAP:显示消息 Toast
- c# - 单击提交按钮未命中剃须刀页面.net core 3.1上的服务器端代码
- google-chrome-extension - 如何安装 Chrome 扩展的测试版?