馬克飛象自定義代碼段風(fēng)格
個人比較喜歡用馬克飛象書寫博客和筆記, 但是不喜歡那種黑底的代碼段風(fēng)格, 整理出來了修改代碼段風(fēng)格的方法便于以后查閱。
在這里選擇你喜歡的代碼樣式

代碼樣式
這里我選擇的是xcode, 還有其他多種風(fēng)格 可以任意選擇
https://github.com/isagalaev/highlight.js/tree/master/src/styles
然后再這里找到你所選風(fēng)格的css風(fēng)格, 點擊進去拷貝出css內(nèi)容


然后打開馬克飛象--->賬號--->設(shè)置--->自定義渲染css將你拷貝的內(nèi)容復(fù)制進去!

css.png
然后就可以看到修改后代碼高亮的效果了

屏幕快照 2016-03-03 下午6.56.38.png
在代碼前加上“ ``` + 語言”, 就可以讓你的呈現(xiàn)代碼高亮 例如 ```ObjectiveC
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #c32275}p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #78492a}p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo}p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'PingFang SC'; color: #1d9421}p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #3d1d81}p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #1d9421}p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #0d9ce3}span.s1 {font-variant-ligatures: no-common-ligatures}span.s2 {font-variant-ligatures: no-common-ligatures; color: #000000}span.s3 {font-variant-ligatures: no-common-ligatures; color: #0d9ce3}span.s4 {font-variant-ligatures: no-common-ligatures; color: #c32275}span.s5 {font-variant-ligatures: no-common-ligatures; color: #703daa}span.s6 {font-variant-ligatures: no-common-ligatures; color: #6122ae}span.s7 {font-variant-ligatures: no-common-ligatures; color: #3d1d81}span.s8 {font: 13.0px Menlo; font-variant-ligatures: no-common-ligatures; color: #000000}span.s9 {font: 13.0px Menlo; font-variant-ligatures: no-common-ligatures}span.s10 {font-variant-ligatures: no-common-ligatures; color: #0435ff}span.s11 {font-variant-ligatures: no-common-ligatures; color: #78492a}
lse {
viewType = type == k_VIEW_TYPE_HEADER ? k_VIEW_TYPE_HEADER : k_VIEW_TYPE_FOOTER;
}
self.backgroundColor = [UIColor clearColor];
//初始化加載指示器(菊花圈)
float indicatorViewX = (frame.size.width-20)/2;
indicatorView = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(indicatorViewX, (k_STATE_VIEW_HEIGHT - 20) / 2, 20, 20)];
indicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
//indicatorView.hidesWhenStopped = YES;
indicatorView.alpha = 0;