博文代码高亮及针对本博客的显示优化(2018.11.16 GitHub Gist)
写了本文后的继续死磕
2018.11.16
行内高亮已于 2018.11.13 加入默认 css,用
一劳永逸的多行高亮解决法:GitHub Gist
本文到这里就停止更新了(大概)
高亮工具:hilite.me
优化规则:
inline code beautifier(2018.11.13 已加入默认 css):
2018.11.16
行内高亮已于 2018.11.13 加入默认 css,用
<code></code>
tag 围起来就可以了。一劳永逸的多行高亮解决法:GitHub Gist
本文到这里就停止更新了(大概)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div | |
style= | |
"background: #ffffff; | |
overflow:auto; | |
width:auto; | |
border:solid gray; | |
border-width:.1em .1em .1em .8em; | |
padding:.2em 1em;"> | |
<table><tr> | |
<td> | |
<pre style="margin: 0; line-height: 125%">1</pre> | |
</td> | |
<td> | |
<pre style="margin: 0; line-height: 125%">print 'hello world!'</pre> | |
</td> | |
</tr></table> | |
</div> |
高亮工具:hilite.me
注意:贴了代码后就不可以再转回 WYSIWYG 编辑器了,必须留在 html 编辑器。
优化规则:
- 超过 10 行的,在行号 1 前面插入
- 表格第一行
<td>
中的<pre style>
的 margin 改成0 1em 0 0
,不足 10 行的改成0 1em 0 0.5em
- 代码缩进:
 
inline code beautifier(2018.11.13 已加入默认 css):