laravel8 tailwindcss 启动遇到了问题

我是用 tailwindcss 按照官方的例子去写个简单的前端,但是都样式可以一样,但是到了效果 动画啊,背景暗黑模式啊什么的都没有效果,是不是没有导入 js,laravel8 不是创建 jet 项目的时候一块儿帮搭建好的吗?

《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
最佳答案

默认情况下有些响应式效果没有启用,例如这里提到的 textColor。如果想要开启,需要在 tailwind.config.js 中配置,然后重新跑 npm run dev 进行打包。

4年前 评论
讨论数量: 2

看看 tailwindcss 文档 吧。引用一句原话:

It’s important to note that because of file size considerations, the dark mode variant is not enabled in Tailwind by default.
To enable it, set the darkMode option in your tailwind.config.js file to media:

// tailwind.config.js
module.exports = {
  darkMode: 'media',
  // ...
}

谷歌翻译:

重要的是要注意,由于文件大小的考虑,默认情况下,Tailwind 中未启用深色模式变体。
要启用它,请将您的 tailwind.config.js 文件中的 darkMode 选项设置为 media:

4年前 评论

默认情况下有些响应式效果没有启用,例如这里提到的 textColor。如果想要开启,需要在 tailwind.config.js 中配置,然后重新跑 npm run dev 进行打包。

4年前 评论