当前位置: 首页 > news >正文

网站建设哪里好薇美食网站的建设开题报告

网站建设哪里好薇,美食网站的建设开题报告,网站开发语言哪种好,网站备案周期第一种tailwindcss: tailwindcss官网 https://tailwindcss.com/docs/grid-column 基本介绍及优点分析 Tailwind CSS 中文文档 - 无需离开您的HTML,即可快速建立现代网站 PostCss 处理 Tailwind Css 基本流程 PostCSS - 是一个用 JavaScript 工具和插…

第一种tailwindcss:

tailwindcss官网
https://tailwindcss.com/docs/grid-column
在这里插入图片描述

基本介绍及优点分析

Tailwind CSS 中文文档 - 无需离开您的HTML,即可快速建立现代网站

在这里插入图片描述

PostCss 处理 Tailwind Css 基本流程

PostCSS - 是一个用 JavaScript 工具和插件来转换 CSS 代码的工具 | PostCSS中文网
在这里插入图片描述

在 vscode 中,安装 Tailwind Css 插件,增加代码提示

初始化项目

npm init vue@latest

安装 Tailwind Css

npm install -D tailwindcss@latest postcss@latest autoprefixer@latest

执行命令,生成两个配置文件

  • postcss.config.js
  • tailwind.config.js

npx tailwindcss init -p

配置文档参考:配置 - Tailwind CSS 中文文档

修改配置文件 tailwind.config.js

2.6


module.exports = {purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],theme: {extend: {},},plugins: [],**```
3.0版本**```cppmodule.exports = {content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],theme: {extend: {},},plugins: [],
}

创建 index.css,并在 main.ts 中引入

创建 index.css

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

第二种unocss

unocss官网
https://unocss.dev/config/rules
在这里插入图片描述
unocss:最好配合vite去构建文件
操作搜索页面:
在这里插入图片描述

在这里插入图片描述

unocss 原子化

重新构想原子化CSS - 知乎
在这里插入图片描述

unocss 原子化参考资料

由于个人感觉此模块在实际项目中应用很少,所以不做记录,但是为了以防万一,先记下来之前看过的文章及视频,讲的非常清晰,给大佬点赞~~
小满Vue3(第三十七章 unoCss原子化)_哔哩哔哩_bilibili
小满Vue3第三十七章(unocss原子化)_小满zs的博客-CSDN博客
在这里插入图片描述

unocss配置(案例)

安装依赖

npm i --save unocss,@unocss/reset

mian.ts中引入
import '@unocss/reset/tailwind.css' //初始化css
import 'uno.css'//引入unocss
新建unocss.config.ts

可 查看配置文档
在这里插入图片描述

import {defineConfig,presetAttributify,presetUno,presetIcons,
} from "unocss";
export default defineConfig({//预设:m-3 p-3presets: [presetUno(),presetAttributify(),presetIcons({ scale: 1.2, warn: true }),],//快捷方式shortcuts: [["wh-full", "w-full h-full"],["f-c-c", "flex justify-center items-center"],["flex-col", "flex flex-col"],["text-ellipsis", "truncate"],["icon-btn","text-16 inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-primary !outline-none",],],//正则rules: [[/^bc-(.+)$/, ([, color]) => ({ "border-color": `#${color}` })],["card-shadow",{"box-shadow":"0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017",},],],theme: {colors: { primary: "var(--primary-color)", dark_bg: "var(--dark-bg)" },},
});
vite.config.ts中注入
import unocss from 'unocss/vite'plugins: [unocss(),react()]//unocss一定要放react之前
处理unocss写入标签报错

src目录下新建 html.d.ts

//react
import type {AttributifyAttributes} from '@unocss/preset-attributify'
declare module "react"{interface HTMLAttributes<T> extends AttributifyAttributes {}//tsx标签写uno不报错
}
//vue
import type {AttributifyAttributes} from '@unocss/preset-attributify'
declare module "@vue/runtime-dom"{interface HTMLAttributes extends AttributifyAttributes {}//tsx标签写uno不报错
}

在这里插入图片描述
unocss的插件

配置2(案例)

在这里插入图片描述
在这里插入图片描述

unocss配置
Vue3 学习笔记 —— scoped、tailwind、unocss 原子化、Vue3 样式新特性
重新构想原子化CSS

http://www.yayakq.cn/news/945148/

相关文章:

  • 网站打开404错误怎么解决网络推广合作方式
  • 邢台县教育局五库建设网站品牌推广专员
  • 做网站自己有模板要花多少钱wordpress 模版安装
  • 怎么做淘宝优惠卷网站网站建设报价购物
  • 福州什么推广网站好wordpress 定时发送
  • 杭州网站制作多少钱100万一300万企业所得税
  • 绵阳网站建设制作seo营销优化
  • 网站做关键词链接有用吗商城网站功能表
  • 河南互联网公司seo网络培训机构
  • 微信开店小程序怎么弄seo优化排名易下拉技巧
  • 如何做淘外网站推广网站做长尾词好还是单个词好
  • 网站开发流程传智播客快三竞猜网站建设
  • 学校门户网站作用wordpress 国定链接
  • 杭州微信网站建设网站模板炫酷
  • o2o网站建设方案ppt镇江市建设工程管理处网站
  • 华为云建站怎么样营销型企业网站的功能有哪些
  • 网站建设学习网站深圳网站建设索q.479185700
  • 免费asp公司网站模板redis wordpress 设置
  • 济宁 做网站电商网络推广方案
  • 个人网站开发开题报告福建省城乡和住房建设厅网站
  • 网站模板和源码区别国外有在线做设计方案的网站吗
  • 做网站网页需要什么嘉兰图工业设计公司现状
  • 泸州市住房和城乡建设厅官方网站济南网站推广¥做下拉去118cr
  • 泗门网站建设小公司做网站多少钱
  • 怎样做网站宣传自己的宾馆公司网站建设需要注意事项
  • 东莞倣网站WordPress移动端加搜索
  • 深圳营销网站设计网站设计论文分类号
  • 住房和城乡建设部网站注册进度外贸谷歌网站推广
  • 网站 推广系部网站建设需求分析运行需求
  • 花垣做网站山东建设工程上传原件的网站