hejianxian / hexo-theme-jane

🎨 Simple enough, a hexo theme.
http://hejx.space
MIT License
90 stars 16 forks source link

代码块问题 #3

Closed stonewen closed 8 years ago

stonewen commented 8 years ago

markdown里写成这样

var a = [];
for (var i = 0; i < 10; i++) {
  a[i] = function () {
    console.log(i);
  };
}
a[6](); // 10

在该主题下博客中显示成这样 image

怎样使用可以变成第一种,markdown和hexo初学者

hejianxian commented 8 years ago

第一种的意思是 没有左边那个1吗?

hejianxian commented 8 years ago

在这里主题里找到这个样式 hexo-theme-jane/source/css/_partial/highlight.styl ,然后你对着页面上的元素,应该是class为gutter这个,然后让它的子元素pre隐藏就好了,然后再调一下左边距离就ok了!

stonewen commented 8 years ago

.gutter pre @extend $line-numbers text-align: right padding: 0 10px //border-right: 1px solid #ddd //margin-right: 10px border-radius: 0 .line height: font-size * line-height .gutter pre .line display:none 嗯,改成这种达到自己想要的效果了,谢谢了