Vue中使用editor.md(3):使用typo.css进行排版

0. 背景

使用typo.csseditor.md生成的html元素进行排版

1. 使用typo.css

1.1 下载

下载地址:https://github.com/sofish/typo.css

在这里插入图片描述

1.2 使用

在这里插入图片描述
项目解压到public/static/

main.js引入css

import '@/../public/static/typo.css-master/typo.css'

在需要排版的标签添加typo

      <!--html信息-->
      <div class="typo blog-html" v-html="blog.html"></div>

2. 测试

在这里插入图片描述

x. 参考

  1. https://typo.sofi.sh/

猜你喜欢

转载自blog.csdn.net/ice_bear221/article/details/131183176