我如何使用顺风渐变背景

how do I gardient background with tailwind

我通过以下方式安装了 React:https://github.com/altafino/react-webpack-5-tailwind-2

我想在图片中制作一个像上面那样的背景颜色。但是我没有得到白色的背景色。但是为什么?

上图来自tailwind.com第一或第二内容

flex items-center space-x-4 p-6 md:px-10 md:py-6 bg-gradient-to-br rounded-b-xl leading-6 font-semibold text-white from-fuchsia-500 to-purple-600

fuchsia 默认不添加颜色。签出 https://tailwindcss.com/docs/customizing-colors#color-palette-reference

// tailwind.config.js
const colors = require('tailwindcss/colors')

module.exports = {
  theme: {
    colors: {
      // Build your palette here
      fuchsia: colors.fuchsia,
  }
}

那么,你的渐变 from-fuchsia-500 就可以了。