'./src/**/*.{vue,js,ts,jsx,tsx}'],darkMode: , // or 'media' or 'class'theme: { colors,extend: {}, },variants: {extend: {backgroundColor: [],textColor: [], },
Utilities for controlling an element's background color. ClassStyles bg-inherit background-color: inherit; bg-current background-color: currentColor; bg-transparent background-color: transparent; bg-black background-color: var(--color-black);/* #000 */ ...
背景颜色(color) 语法: background-color:颜色值; 默认的值是 transparent 透明的 背景图片(image...
只需要设置几个选项就能完成,并且搭配了 tailwindcss 的 color 系统灵活性也非常的好。
Background Color Utilities for controlling an element's background color. Default class reference Class Properties Preview bg-transparentbackground-color: transparent; bg-currentbackground-color: currentColor; bg-black--tw-bg-opacity: 1; background-color: rgba(0, 0, 0, var(--tw-bg-opacity));...
backgroundColor: ['dark'], textColor: ['dark'], borderColor: ['dark'], }, }, } 基础深色模式样式 接下来,我们来实现一些基础的深色模式样式: <!-- 基础页面结构 --> <!-- 导航栏 -->
Button Button Utilities are for clamping text up to 6 lines are generated by default:ClassCSS bg-primary-10-10 background-color: hsl(var(--tw-primary-hue) 10% 10% / var(--tw-bg-opacity)); bg-success-20-50 background-color: hsl(var(--tw-success-hue) 20% 50% / var(--tw-bg-...
ClassCSS Properties bg-inherit background-color: inherit; bg-current background-color: currentColor; bg-transparent background-color: transparent; bg-black background-color: rgb(0 0 0); bg-white background-color: rgb(255 255 255); bg-slate-50 background-color: rgb(248 250 252); bg-...
// tailwind.config.jsmodule.exports={plugins:[require('./plugins/button'),// 带选项的插件require('@tailwindcss/forms')({strategy:'class'})]} 预处理器集成 PostCSS 配置 // postcss.config.jsmodule.exports={plugins:{'postcss-import':{},'tailwindcss/nesting':{},tailwindcss:{},autoprefixer:...
Class Properties Preview bg-transparentbackground-color: transparent; bg-currentbackground-color: currentColor; bg-black--tw-bg-opacity: 1; background-color: rgba(0, 0, 0, var(--tw-bg-opacity)); bg-white--tw-bg-opacity: 1; background-color: rgba(255, 255, 255, var(--tw-bg-opacity...