【发布时间】:2020-04-12 11:34:00
【问题描述】:
我似乎无法让 TailwindCSS @apply 工作。 Visual Studio Code 似乎无法识别我的代码。
.btn {
@apply mb-2 bg-purple-600 text-gray-100 font-bold p-3 rounded;
}
【问题讨论】:
标签: css tailwind-css
我似乎无法让 TailwindCSS @apply 工作。 Visual Studio Code 似乎无法识别我的代码。
.btn {
@apply mb-2 bg-purple-600 text-gray-100 font-bold p-3 rounded;
}
【问题讨论】:
标签: css tailwind-css
您在应用命令“.”中定义的没有顺风类名称。你不需要放它。
作为一种解决方案,将所有顺风元素写在一行中。
.btn {
@apply mb-2 bg-purple-600 text-gray-100 font-bold p-3 rounded;
}
【讨论】:
全部写在一行中:
.btn {
@apply mb-2 bg-purple-600 text-gray-100 font-bold p-3 rounded;
}
希望对你有帮助。
【讨论】: