【发布时间】:2021-09-11 13:24:45
【问题描述】:
我刚开始学习 Tailwind 和 Nextjs,实际上我是在按照教程编写代码,并且完全按照视频中的内容进行操作。我想在悬停时在图标上使用反弹动画。有趣的是,它第一次确实有效,但后来就停止了。
function HeaderItem({Icon, title}) {
return (
<div className="flex flex-col items-center cursor-pointer group w-12 sm:w-20 hover:text-white">
<Icon className="h-8 mb-1 group-hover:animate-bounce"/>
<p className="opacity-0 group-hover:opacity-100 tracking-widest">{title}</p>
</div>
)
}
到目前为止,这是我的顺风配置
module.exports = {
mode: "jit",
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}
【问题讨论】:
标签: reactjs next.js tailwind-css