简洁、直观、强悍、跨浏览器的前端开发框架,让web开发更迅速、简单。
ting.css,有多种使用方式,最简单的方式就是直接引入全量。
首先下载ting.css,然后在你的页面上用link标签引入。
新版本只支持border-box盒模型,如果您想要兼容IE6、IE7需要在doctype之前打一行注释。
<!--BORDERBOX--> <!DOCTYPE html> <html> <head> <title>Ting</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <link href="css/ting.css" rel="stylesheet"/> </head> <body> <h1>Hello, world!</h1> </body> </html>
可以通过 npm i @ting-ui/css 安装,然后在你的项目中的html模板中插入标签。
<link href="node_modules/@ting-ui/css/ting.css" rel="stylesheet"/>
如果你的构建工具支持的话,会自动生成到dist目录下。
本项目支持部分暗黑模式和全局暗黑模式。假如你把左侧栏设为暗黑模式,在左侧栏的容器上加入.dark样式类,左侧栏就会是黑色的。如果要全局使用暗黑模式,在html上加入.dark样式类。
const purgecss = require('postcss-purgecss'); purgecss({ content: ["index.html"], whitelist: [略], keyframes: true, fontFace:true });