惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
U
Unit 42
V
Visual Studio Blog
D
DataBreaches.Net
F
Fortinet All Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
T
The Blog of Author Tim Ferriss
GbyAI
GbyAI
博客园 - 叶小钗
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MongoDB | Blog
MongoDB | Blog
The Cloudflare Blog
云风的 BLOG
云风的 BLOG
D
Docker
G
Google Developers Blog
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
S
SegmentFault 最新的问题

碎言

不懂就别瞎掰掰:【程序员的常识】写的什么玩意? AI 辅助编程下的程序设计与代码编写 使用 Next.js 和 Tailwind CSS 构建可编辑和删除的 ToDo 待办事项应用 探索编程新境界:MarsCode 助你一臂之力 使用 Next.js 和 Tailwind CSS 搭建静态图片展示站点并部署到 Vercel AI 辅助编程:免费工具的优缺点及官网一览 GitHub push更新总是失败,写个python脚本解决 把博客从GitHub迁移到到了vercel ComfyUI 和 Flux.1 安装与使用教程 Flux.1 入门必知:硬件、环境、模型 Git项目的子文件夹中的内容无法同步到远程仓库的解决方法 blender流体Fluid使用中没有流体、流体穿模等一些问题的解决方法 博客聚合网站:积薪,竟然关闭了! blender日常使用中的一些技巧 虽然只有我自己在用,但还是更新了碎言博客的源代码, 与其在迷茫中困惑,不如在努力中前进 差点忘了我还有一个博客... 秧歌、博客和AI 终于熬到了新手上路 好久没有更新博客了。。。 老妈大腿骨骨折,最近一直在医院护理 Hello, September! Ubuntu开机自动启动Docker容器运行WordPress Docker 简单快速安装部署WordPress Docker下安装MySQL 加碘盐能防核辐射的话,还怕什么核战争? shields.io 一个简洁、一致、清晰的徽章 Ubuntu下使用root登录ssh的设置 GitHub Actions 构建、部署 Next.js项目 我又用回了"IE"--edge
Vue+element+Vite安装 Tailwind CSS
J.sky · 2023-05-30 · via 碎言

在Vue+element+Vite项目中设置 Tailwind CSS。

  1. 请先创建一个新的Vite项目。最常见的方法是使用 Create Vite。

    npm init vue@latest

起好项目的名称,然后一路回车即可。

  1. 安装 tailwindcss 及其对等依赖项,然后生成 tailwind.config.jspostcss.config.js 文件。

    npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p

  2. tailwind.config.js 文件中添加所有模板文件的路径。

    /** @type {import(‘tailwindcss’).Config} / export default { content: [ ”./index.html”, ”./src/**/.{vue,js,ts,jsx,tsx}”, ], theme: { extend: {}, }, plugins: [], }

  3. 将每个 Tailwind 层的 @tailwind 指令添加到您的 ./src/style/taiwind.css 文件中。

    @tailwind base; @tailwind components; @tailwind utilities;

  4. 在main.js中添加taiwind.css的引用:

    import ”./style/tailwind.css”;

  5. 使用 npm run dev 运行构建过程。

  6. 开始使用 Tailwind 的实用程序类来设计您的内容。

<h1 class="text-3xl font-bold underline">Hello world!</h1>

你学会了吗?