If you do not know MarkdownPad2 use code highlighting plugin to view the previous article "MarkdownPad2 Using code highlighting plugin"
First look at the mobile side:
Click on the mobile side to see the effect or mobile scan the following QR code:
we often read the public number of articles, often see the article has a highlighted code, and this code will not wrap, you can drag the left and right scrolling this effect for us to read the code is very convenient and comfortable, the previous article using the Highlight plugin is not compatible with the mobile side, after a simple pair of highlighted code The style has to be modified, and then the HTML is exported via markdownpad2, so that we can view our own code notes on the mobile side. This time someone will wonder How I open the HTML file on the mobile side? This we can build a static site through Githbub Warehouse, here does not mention, and then upload to GitHub, we can move to access their own code notes! Of course, I only modified the style of the highlighted code, the follow-up constantly improved.
CSS style is modified on the basis of SUNBURST.CSS, the complete code is as follows:
/*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 ( +, si, +);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-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:Song Body;}. Prettyprint span{Line-height:21px;font-size:18px;}Pre Code{width:100%;Overflow:Auto;Display:Block;}
MarkdownPad2 code highlighting plugin compatible with mobile-style