【发布时间】:2021-03-18 16:32:52
【问题描述】:
我是初学网页设计师,使用 windows10。
我正在使用顺风(1.9.6 版)
我想在 css 文件中使用 @apply 提取的组件使用前缀(例如 sm 和 md ),如下所示。
css
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.itemcase {
@apply border border-gray300 text-sm font-semibold
}
}
我认为下面的代码可以工作,但没有工作。
@layer components {
.itemcase:sm {
@apply border border-gray300 text-lg font-bold
}
}
我该如何解决这个问题?
我阅读了似乎与此问题相关的文档(https://tailwindcss.com/docs/functions-and-directives),但无法找到解决方案。 请帮帮我...
【问题讨论】:
标签: components apply responsive prefix tailwind-css