0. 背景
使用typo.css
对editor.md
生成的html
元素进行排版
1. 使用typo.css
1.1 下载
下载地址:https://github.com/sofish/typo.css
![在这里插入图片描述](https://img-blog.csdnimg.cn/4181fe7d15004fb2a50b0b6f3af1a161.png)
1.2 使用
![在这里插入图片描述](https://img-blog.csdnimg.cn/80de833d72014938bb80b96e3698b4ff.png)
项目解压到public/static/
下
main.js
引入css
import '@/../public/static/typo.css-master/typo.css'
在需要排版的标签添加typo
类
<div class="typo blog-html" v-html="blog.html"></div>
2. 测试
![在这里插入图片描述](https://img-blog.csdnimg.cn/070bf16a40b94719aff40f51930f3212.png)
x. 参考
- https://typo.sofi.sh/