最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

vue?tailwindcss安裝配置教程示例詳解

 更新時間:2023年09月01日 09:59:00   作者:風(fēng)如也  
這篇文章主要為大家介紹了vue?tailwindcss安裝配置教程示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪

Tailwind CSS with Vue

tailwindcss官方文檔

創(chuàng)建Vue項目

npm create vite@latest my-project -- --template vue
cd my-project

安裝Tailwind CSS

創(chuàng)建tailwind.config.jspostcss.config.js

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

配置tailwind.config.js

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

添加Tailwind指令到全局css文件中

此處文件地址比如在./src/style.css

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

在main.js入口引入style.css

import { createApp } from 'vue'
import './style.css'

啟動項目

npm run dev

在模板中使用tailwindcss

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

可以看到頁面上此時已經(jīng)有效果了,具體使用教程可以查看官方文檔。

以上就是vue tailwindcss安裝配置教程示例詳解的詳細(xì)內(nèi)容,更多關(guān)于vue tailwindcss安裝配置的資料請關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

最新評論

普格县| 如皋市| 宁晋县| 衡东县| 凤城市| 青神县| 黎平县| 普兰店市| 汉阴县| 金溪县| 平潭县| 辉县市| 桐柏县| 武宁县| 龙里县| 剑河县| 高密市| 太湖县| 松江区| 玉山县| 宝山区| 雷山县| 招远市| 琼中| 靖边县| 盘锦市| 民乐县| 盐池县| 于都县| 赞皇县| 麻栗坡县| 武山县| 黑龙江省| 芒康县| 赤峰市| 九龙坡区| 土默特左旗| 封丘县| 甘谷县| 东城区| 绥化市|