指尖上的记忆指尖上的记忆
首页
  • 基础
  • Laravel框架
  • Symfony框架
  • 基础
  • Gin框架
  • 基础
  • Spring框架
  • 命令
  • Nginx
  • Ai
  • Deploy
  • Docker
  • K8s
  • Micro
  • RabbitMQ
  • Mysql
  • PostgreSsql
  • Redis
  • MongoDb
  • Html
  • Js
  • 前端
  • 后端
  • Git
  • 知识扫盲
  • Golang
🌟 gitHub
首页
  • 基础
  • Laravel框架
  • Symfony框架
  • 基础
  • Gin框架
  • 基础
  • Spring框架
  • 命令
  • Nginx
  • Ai
  • Deploy
  • Docker
  • K8s
  • Micro
  • RabbitMQ
  • Mysql
  • PostgreSsql
  • Redis
  • MongoDb
  • Html
  • Js
  • 前端
  • 后端
  • Git
  • 知识扫盲
  • Golang
🌟 gitHub

tailwindcss之使用伪元素添加内容的坑:

:deep(.select-none) {
    @apply text-[0px];
    &::before {
      @apply text-base
      @apply content-['No results match your search.'];
    }
  }
  
报: The content-["No class does not exist. If content-["No is a custom class, make sure it is defined within a @layer directive
  
:deep(.select-none) {
    @apply text-[0px];
    &::before {
      @apply text-base;
      @apply content-['No_results_match_your_search.'];
    }
  }
  
原因: Since whitespace denotes the end of a class in HTML, replace any spaces in an arbitrary value with an underscore.  
原文: https://tailwindcss.com/docs/content#setting-a-pseudo-elements-content