github-markdown-css
github-markdown-css 介绍
github-markdown-css复制GitHub Markdown样式的最小css量。
安装
手动下载,从CDNjs,或使用npm:
$ npm install github-markdown-css
使用
复制品导入github-markdown.css文件并将markdown-body类添加到渲染的Markdown的容器中,并为其设置宽度。 GitHub使用980px宽度和45px填充,以及15px填充用于移动设备。
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="github-markdown.css">
<style>
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
}
@media (max-width: 767px) {
.markdown-body {
padding: 15px;
}
}
</style>
<article class="markdown-body">
<h1>Unicorns</h1>
<p>All the things</p>
</article>
网站地址:https://sindresorhus.com/github-markdown-css/
GitHub:https://github.com/sindresorhus/github-markdown-css
网站描述:GitHub Markdown 样式的一个简洁 CSS