MarkdownPad2代碼高亮外掛程式相容移動端樣式

來源:互聯網
上載者:User

標籤:簡單的   play   ati   spec   font   UI   indent   tty   dia   

如果不知道MarkdownPad2使用代碼高亮外掛程式可以查看前一篇文章《MarkdownPad2使用代碼高亮外掛程式》

先看移動端:

移動端點擊查看效果 或者手機掃如下二維碼:

我們經常閱讀公眾號文章的時候,常常看到文章內有高亮的代碼,並且這代碼不會換行,可以左右拖動滾動這樣的效果對於我們閱讀代碼很方便也很舒服,上一篇文章使用高亮外掛程式並不相容移動端,經過簡單的對高亮代碼樣式得修改,再通過markdownpad2匯出html,這樣我們就可以在移動端查看自己的代碼筆記了。這個時候有人會納悶我在移動端怎麼開啟html檔案呢?這個我們可以通過githbub建立一個靜態網站的倉庫,這裡就不多提了,然後上傳到github,我們就可以移動端訪問自己的代碼筆記啦!當然我只對高亮代碼的樣式進行了修改,後續不斷完善。

css樣式是在sunburst.css基礎上修改的,完整代碼如下:

 

/* Pretty printing styles. Used with prettify.js. *//* Vim sunburst theme by David Leibovic */pre .str, code .str { color: #65B042; } /* string  - green */pre .kwd, code .kwd { color: #E28964; } /* keyword - dark pink */pre .com, code .com { color: #AEAEAE; font-style: italic; } /* comment - gray */pre .typ, code .typ { color: #89bdff; } /* type - light blue */pre .lit, code .lit { color: #3387CC; } /* literal - blue */pre .pun, code .pun { color: #fff; } /* punctuation - white */pre .pln, code .pln { color: #fff; } /* plaintext - white */pre .tag, code .tag { color: #89bdff; } /* html/xml tag    - light blue */pre .atn, code .atn { color: #bdb76b; } /* html/xml attribute name  - khaki */pre .atv, code .atv { color: #65B042; } /* html/xml attribute value - green */pre .dec, code .dec { color: #3387CC; } /* decimal - blue  */pre.prettyprint, code.prettyprint {    background-color: rgb(47, 54, 64);    border-radius: 8px;}pre.prettyprint {    display: block;    width: 95%;    margin: 1em auto;    padding: 1em;    box-sizing: border-box;    overflow: auto;}/* Specify class=linenums on a pre to get line numbering */ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE; } /* IE indents via margin-left */li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }/* Alternate shading for lines */li.L1,li.L3,li.L5,li.L7,li.L9 { }@media print {  pre .str, code .str { color: #060; }  pre .kwd, code .kwd { color: #006; font-weight: bold; }  pre .com, code .com { color: #600; font-style: italic; }  pre .typ, code .typ { color: #404; font-weight: bold; }  pre .lit, code .lit { color: #044; }  pre .pun, code .pun { color: #440; }  pre .pln, code .pln { color: #000; }  pre .tag, code .tag { color: #006; font-weight: bold; }  pre .atn, code .atn { color: #404; }  pre .atv, code .atv { color: #060; }}body{margin:0;padding:0}h2{ font-family: 宋體;}.prettyprint span{    line-height:21px;    font-size:18px;}pre code{ width:100%; overflow:auto; display:block;}

 

 

 

 

MarkdownPad2代碼高亮外掛程式相容移動端樣式

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.