Usage scenarios
The body of the article contains all kinds of data: paragraphs, headings, lists, links, images, videos, and other resources.
Github-markdown-css can be used to quickly adjust styles
- Before using the style plug-in
- After using the style plug-in
Using the step
-
Download the Github – Markdown-CSS style file into the project
- Open the link and copy all styles into the new file’s own project
-
Import in article/index.vue
import './github-markdown.css' Copy the code
-
Add the class name where appropriate
<div class="article-content markdown-body" v-html="article.content"></div> Copy the code
-
Note: if you set the px to REM configuration in the.postcsscr.js file, do not convert the font size in the style file
'postcss-pxtorem': { rootValue ({ file }) { return file.indexOf('vant') ! = = 1? }, propList: ['*'], // exclude: 'github markdown'}Copy the code