我正在使用 TailwindCSS,但遇到了一些问题:
bg-white 默认输出背景颜色:“#fff !important”。
hover:!bg-white 被忽略。悬停:bg-white 效果很好。
我尝试在 tailwind.config.js 中进行设置:
theme: {
colors: {
white: "#ffffff",
},
}
问题很可能是
hover:!bg-white
不起作用,因为顺风不支持!important
为了确保它有效,您可以尝试这样做:
module.exports = {
important: true,
theme: {
colors: {
white: "#ffffff",
},
},
};