tailwind.config.js 1017 B

1234567891011121314151617181920212223242526272829303132333435
  1. module.exports = {
  2. content: [
  3. "./src/**/*.{js,jsx,ts,tsx}",
  4. ],
  5. plugins: [
  6. function ({ addUtilities }) {
  7. const newUtilities = {
  8. '.scrollbar-thin': {
  9. scrollbarWidth: '2px',
  10. // scrollbarColor: 'rgba(13, 83, 222, 1)',
  11. '&::-webkit-scrollbar': {
  12. width: '6px',
  13. height: '6px'
  14. },
  15. '&::-webkit-scrollbar-track': {
  16. backgroundColor: 'transparent'
  17. },
  18. '&::-webkit-scrollbar-thumb': {
  19. // backgroundColor: 'rgba(13, 83, 222, 0.01)',
  20. borderRadius: '20px',
  21. border: '3px solid transparent'
  22. },
  23. '&:hover::-webkit-scrollbar-thumb': {
  24. width: '6px',
  25. border: '3px solid rgb(229 231 235)',
  26. backgroundColor: 'rgb(229 231 235)'
  27. }
  28. }
  29. // 你可以添加更多自定义的滚动条样式
  30. };
  31. addUtilities(newUtilities, ['responsive', 'hover']);
  32. },
  33. ],
  34. // ...other configurations
  35. }