next.js - 如何在“createGlobalStyle”中导入顺风
问题描述
我正在尝试在我的样式化组件 globalstyle 中导入 tailwind,以设置基本样式。
下面的代码不起作用,那么关于如何使它起作用的任何建议?
import {createGlobalStyle} from 'styled-components';
const GlobalStyle = createGlobalStyle`
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
h1 {
@apply text-2xl;
}
h2 {
@apply text-xl;
}
}
`
解决方案
推荐阅读
- python - 自动拆分具有异常字符的 CSV
- iis - 无法在 IIS 10.0 中将域用户名用作指定用户
- c# - 有没有办法要求在 C# 中密封派生类?
- jquery - 如果有子列表,则选择列出项目
- hibernate - 为什么hibernate在插入查询之前执行选择查询?
- django - Django URL 重定向和更改 URL 结构
- php - 连接phpmyadmin和html
- java - Java 中的负短路到 NDK 中的 uint16_t 处理不正确?
- python - 在我的 CentOS7.2 中,我有 `python3` 命令,但为什么我不能使用 pyvenv?
- c++ - 将对象传递给 Node.js C++ 插件