tailwindcss类在 /user /1之类的路线中不起作用
当我提供 /home之类的路线时,我已经配置了tailwind CSS及其正常工作 <路由路径='/home'元素= {}> <路由路径='/of of'element = {}>
但是当我制作 /用户 /1之类的路线时 <路由路径='/user/1'元素= {}>
然后在同一项目中无法在该路线组件中工作的尾风类
i have configure tailwind css and its properly working when i give routes like /home ,/about
<Route path='/home' element={}>
<Route path='/about' element={}>
but when i make routes like /user/1
<Route path='/user/1' element={}>
then tailwind classes not working in that Route component in same project
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如逆风文档中清楚地提到的那样。
./ src/**/*。{js,jsx,ts,tsx}
路径可用于尾风,因此请尝试查看是否匹配路径是否匹配tailwind.config.js file
如果不是根据要求编辑。
As clearly mentioned in tailwind docs.
./src/**/*.{js,jsx,ts,tsx}
path is available for tailwind, so try to see whether you path matchestailwind.config.js file
If not edit as per requirement.
如果您正在使用下一个13,并且APP文件夹中没有Layout.tsx,请确保在其他Layout.jsx文件中手动导入Globals.css。例如下面类似结构的结构:
If you're using Next 13 and there isn't a layout.tsx in the app folder, then make sure to import globals.css manually in other layout.jsx files. For instance a structure like the one below: