ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

mybase修改默认的markdown样式

2021-02-23 17:01:33  阅读:584  来源: 互联网

标签:markdown color margin 默认 font hljs mybase border pl


mybase原来的样式备份

/*
CSS for Markdown Document Renderer
======================================
The stylesheet code must conform to the W3C/CSS Specs. (https://www.w3.org/Style/CSS/)
It's recommended that you first create a backup of the stylesheet code before making modifications.
*/

body, table {
	font-family: sans-serif;
	font-size: 1em;
	line-height: 150%;
}

table {
	border-collapse: collapse;
	border: 1px solid gray;
	border-width: 2px 1px 2px 1px;
	border-spacing: 0;
	font-size: 0.85em;
}

th {
	border: 1px solid gray;
	padding: 4px;
	background-color: #ddd;
}

td {
	border: 1px solid gray;
	padding: 4px;
}

tr:nth-child(2n) {
	background-color: #f8f8f8;
}

blockquote {
	margin-left: 1em;
	border-left: 6px solid #ddd;
	padding-left: 3px;
	color: #777;
}

pre {
	border: 2px solid #d6d6d6;
	padding: 4px;
	border-radius: 7px;
	background: lightgrey;
}

code {
	font-family: "Monaco", "Consolas", "Monospace", "Courier New", "Courier";
	font-size: 0.85em;
}

a {
	color: #0366d6;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

hr {
	border: 0;
	border-bottom: 1px solid #ddd;
}

h1 {
	font-size: 2.0em;
}

h2 {
	font-size: 1.8em;
}

h3 {
	font-size: 1.6em;
}

h4 {
	font-size: 1.4em;
}

h5 {
	font-size: 1.2em;
}

h6 {
	font-size: 1em;
}

修改mybase的markdown样式

  1. mybase打开一个新建的markdown格式的笔记,或者打开一个已有的markdown笔记
  2. 鼠标右键切换到预览markdown格式
  3. 鼠标右键,编辑markdown样式表,将下放的代码拷贝到代码框,应用即可
* {
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    color: #000;
    background: #FFF;
    font-family: "verdana","Arial","微软雅黑", "Helvetica", "sans-serif";
    font-size: 9pt;
    min-height: 101%;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

fieldset, img {
    border: 0;
}
ul {
    word-break: break-all;
}
li {
    list-style: none;
}
h1, h2, h3, h4, h5, h6 {
    font-size: 110%;
    font-weight: normal;
}


a:link {
    color: black;
    text-decoration: none;
}
a:visited {
    color: black;
    text-decoration: none;
}
a:hover {
    color: #F60;
    /* 
    下划线
    text-decoration: underline;
    */
    
}
a:active {
    color: black;
    text-decoration: none;
}
.clear {

    clear: both;
}




/** MarkDown样式调整 */

 {
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    color: #333;
    overflow: hidden;
    font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    word-wrap: break-word;
}




 a {
  background: transparent;
}




 a:active,
 a:hover {
  outline: 0;
}




 strong {
  font-weight: bold;
}




 h1 {
    font-size: 2em;
    margin: 0.67em 0;
}




 img {
  border: 0;
}




 hr {
    box-sizing: content-box;
    height: 0;
}




 pre {
  overflow: auto;
}




 code,
 kbd,
 pre {
    font-family: Consolas, "微软雅黑", Menlo, Courier, monospace !important
    font-size: 1em;
}




 input {
    color: inherit;
    font: inherit;
    margin: 0;
}




 html input[disabled] {
  cursor: default;
}




 input {
  line-height: normal;
}




 input[type="checkbox"] {
    box-sizing: border-box;
    padding: 0;
    font-size: 16px;
}




 table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* 控制 表格 没有框线*/
#cnblogs_post_body table, .cnblogs-post-body table {

    border: 0px solid #c0c0c0; 
    border-collapse: collapse;
    word-break: break-word;

}


 td,
 th {
  padding: 0;
}




 * {
    box-sizing: border-box;
    /*! font-size: 16px; */
}




 input {
  font: 13px/1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}




 a {
    color: #4183c4;
    text-decoration: none;
}




 a:hover,
 a:active {
  text-decoration: underline;
}




 hr {
    height: 0;
    margin: 15px 0;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #ddd;
}




 hr:before {
    display: table;
    content: "";
}




 hr:after {
    display: table;
    clear: both;
    content: "";
}




 h1,
 h2,
 h3,
 h4,
 h5,
 h6 {
    margin-top: 15px;
    margin-bottom: 10px;
    line-height: 1.1;
}




 blockquote {
  margin: 0;
    line-height:  1.7 !important;
}




 ul,
 ol {
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
}




 ol ol,
 ul ol {
  list-style-type: lower-roman;
}




 ul ul ol,
 ul ol ol,
 ol ul ol,
 ol ol ol {
  list-style-type: lower-alpha;
}




 dd {
  margin-left: 0;
}










 pre {
margin-top: 0;
margin-bottom: 0;
  font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}




 .octicon {
    font: normal normal normal 16px/1 octicons-anchor;
    display: inline-block;
    text-decoration: none;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}




 .octicon-link:before {
  content: '\f05c';
}




>*:first-child {
  margin-top: 0 !important;
}




>*:last-child {
  margin-bottom: 0 !important;
}




 a:not(:link):not(:visited) {
    color: inherit;
    text-decoration: none;
}




 .anchor {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    padding-right: 6px;
    padding-left: 30px;
    margin-left: -30px;
}




 .anchor:focus {
  outline: none;
}




 h1,
 h2,
 h3,
 h4,
 h5,
 h6 {
    position: relative;
    margin-top: 1em;
    margin-bottom: 16px;
    font-weight: bold;
    line-height: 1.4;
}


 h1 .octicon-link,
 h2 .octicon-link,
 h3 .octicon-link,
 h4 .octicon-link,
 h5 .octicon-link,
 h6 .octicon-link {
    display: none;
    color: #000;
    vertical-align: middle;
}

 h1:hover .anchor,
 h2:hover .anchor,
 h3:hover .anchor,
 h4:hover .anchor,
 h5:hover .anchor,
 h6:hover .anchor {
    padding-left: 8px;
    margin-left: -30px;
    text-decoration: none;
}

 h1:hover .anchor .octicon-link,
 h2:hover .anchor .octicon-link,
 h3:hover .anchor .octicon-link,
 h4:hover .anchor .octicon-link,
 h5:hover .anchor .octicon-link,
 h6:hover .anchor .octicon-link {
  display: inline-block;
}


 h1 {
    padding-bottom: 0.3em;
    font-size: 2.25em !important;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}


 h1 .anchor {
  line-height: 1;
}

 h2 {
    padding-bottom: 0.3em;
    font-size: 1.75em !important;
    line-height: 1.225;
    /*! border-bottom: 1px solid #eee; */
}

 h2 .anchor {
  line-height: 1;
}


 h3 {
    font-size: 1.5em!important;
    line-height: 1.43;
}


 h3 .anchor {
  line-height: 1.2;
}


 h4 {
  font-size: 1.25em !important;
}


 h4 .anchor {
  line-height: 1.2;
}


 h5 {
  font-size: 1em !important;
}


 h5 .anchor {
  line-height: 1.1;
}


 h6 {
    font-size: 1em !important;
    color: #777;
}


 h6 .anchor {
  line-height: 1.1;
}


 p,
 blockquote,
 ul,
 ol,
 dl,
 table,
 pre {
    margin-top: 0;
    margin-bottom: 16px;
}



 hr {
    height: 4px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
}


 ul,
 ol {
    padding-left: 2em;
    font-size: 14px;
}


 ul ul,
 ul ol,
 ol ol,
 ol ul {
    margin-top: 0;
    margin-bottom: 0;
}


 li>p {
  margin-top: 16px;
}


 dl {
  padding: 0;
}


 dl dt {
    padding: 0;
    margin-top: 16px;
    font-size: 1em;
    font-style: italic;
    font-weight: bold;
}


 dl dd {
    padding: 0 16px;
    margin-bottom: 16px;
}


 blockquote {
    color: #333;
    padding: 2px 10px;
    border: none;


    border-left: 5px solid #D6DBDF;
    line-height: 1.6;
}


 blockquote>:first-child {
  margin-top: 0;
}


 blockquote>:last-child {
  margin-bottom: 0;
}


 table {
    display: block;
    width: 100%;
    overflow: auto;
    word-break: normal;
    word-break: keep-all;
}


 table th {
  font-weight: bold;
}


 table th,
 table td {
    padding: 6px 13px;
    border: 1px solid #ddd;
}


 table tr {
    background-color: #fff;
    border-top: 1px solid #ccc;
}


 table tr:nth-child(2n) {
  background-color: #f8f8f8;
}


 img {
    max-width: 100%;
    box-sizing: border-box;
}


 code {
    font-family: Consolas, "微软雅黑", Menlo, Courier, monospace !important;
    font-size: 12px;
    padding: 0;
    padding-top: 0.2em;
    padding-bottom: 0.2em;
    /*! margin: 0; */
    font-size: 85%;
    background-color: rgba(0,0,0,0.04);
    border-radius: 3px;
    /*! border: none !important; */
    display: inline-block;
}


 code:before,
 code:after {
    letter-spacing: -0.2em;
    content: "\00a0";
}


/*only for syntaxhighlighter */
/*--start--*/
 .syntaxhighlighter table td.code {
  width:95% !important;
}


 .syntaxhighlighter code {
    font-family: "Consolas","Bitstream Vera Sans Mono","Courier New",Courier,monospace!important;
    padding: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
}


 .syntaxhighlighter code:before,
 .syntaxhighlighter code:before {
  letter-spacing: -0.5em;
}
/*--end--*/


 pre>code {
    padding: 0;
    margin: 0;
    font-size: 100%;
    word-break: normal;
    white-space: pre;
    background: transparent;
    border: 0;
}


 .highlight {
  margin-bottom: 16px;
}


 .highlight pre,
 pre {
    
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border-radius: 3px;
}


 .highlight pre {
    margin-bottom: 0;
    word-break: normal;
}


 pre {
  word-wrap: normal;
}


 pre code {
    display: inline;
    max-width: initial;
    padding: 0;
    margin: 0;
    overflow: initial;
    line-height: inherit;
    word-wrap: normal;
    background-color: transparent;
    border: 0;
}


 pre code:before,
 pre code:after {
  content: normal;
}


 kbd {
    display: inline-block;
    padding: 3px 5px;
    font-size: 11px;
    line-height: 10px;
    color: #555;
    vertical-align: middle;
    background-color: #fcfcfc;
    border: solid 1px #ccc;
    border-bottom-color: #bbb;
    border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}


 .pl-c {
  color: #969896;
}


 .pl-c1,
 .pl-mdh,
 .pl-mm,
 .pl-mp,
 .pl-mr,
 .pl-s1 .pl-v,
 .pl-s3,
 .pl-sc,
 .pl-sv {
  color: #0086b3;
}


 .pl-e,
 .pl-en {
  color: #795da3;
}


 .pl-s1 .pl-s2,
 .pl-smi,
 .pl-smp,
 .pl-stj,
 .pl-vo,
 .pl-vpf {
  color: #333;
}


 .pl-ent {
  color: #63a35c;
}


 .pl-k,
 .pl-s,
 .pl-st {
  color: #a71d5d;
}


 .pl-pds,
 .pl-s1,
 .pl-s1 .pl-pse .pl-s2,
 .pl-sr,
 .pl-sr .pl-cce,
 .pl-sr .pl-sra,
 .pl-sr .pl-sre,
 .pl-src {
  color: #183691;
}


 .pl-v {
  color: #ed6a43;
}


 .pl-id {
  color: #b52a1d;
}


 .pl-ii {
    background-color: #b52a1d;
    color: #f8f8f8;
}

 .pl-sr .pl-cce {
    color: #63a35c;
    font-weight: bold;
}


 .pl-ml {
  color: #693a17;
}


 .pl-mh,
 .pl-mh .pl-en,
 .pl-ms {
    color: #1d3e81;
    font-weight: bold;
}


 .pl-mq {
  color: #008080;
}


 .pl-mi {
    color: #333;
    font-style: italic;
}


 .pl-mb {
    color: #333;
    font-weight: bold;
}


 .pl-md,
 .pl-mdhf {
    background-color: #ffecec;
    color: #bd2c00;
}


 .pl-mdht,
 .pl-mi1 {
    background-color: #eaffea;
    color: #55a532;
}


 .pl-mdr {
    color: #795da3;
    font-weight: bold;
}


 .pl-mo {
  color: #1d3e81;
}


 kbd {
    display: inline-block;
    padding: 3px 5px;
    font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
    line-height: 10px;
    color: #555;
    vertical-align: middle;
    background-color: #fcfcfc;
    border: solid 1px #ccc;
    border-bottom-color: #bbb;
    border-radius: 3px;
    box-shadow: inset 0 -1px 0 #bbb;
    padding-top: 20px;
}


 .task-list-item {
  list-style-type: none;
}


 .task-list-item+.task-list-item {
  margin-top: 3px;
}


 .task-list-item input {
    margin: 0 0.35em 0.25em -1.6em;
    vertical-align: middle;
}


 :checked+.radio-label {
    z-index: 1;
    position: relative;
    border-color: #4183c4;
}

/*
Monokai Sublime style. Derived from Monokai by noformnocontent https://nn.mit-license.org/
*/

pre {
/*控制代码不换行*/
    white-space: pre;
    word-wrap: normal;
}
 .hljs {
    font-size: 16px!important;
    font-family: consolas,monospace !important;
    display: block;
    overflow-x: auto;
    padding: 0.5em;
    background: #23241f !important;
    color: #FFF;
    white-space: pre;
    word-break: normal;
  padding: 10px 15px !important;
}

.hljs,
.hljs-tag,
.hljs-subst {
  color: #f8f8f2;
}


.hljs-strong,
.hljs-emphasis {
color: #a8a8a2;
}

.hljs-bullet,
.hljs-quote,
.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-link {
  color: #ae81ff;
}

.hljs-code,
.hljs-title,
.hljs-section,
.hljs-selector-class {
  color: #a6e22e;
}




.hljs-strong {
  font-weight: bold;
}


.hljs-emphasis {
  font-style: italic;
}




.hljs-keyword,
.hljs-selector-tag,
.hljs-name,
.hljs-attr {
  color: #f92672;
}




.hljs-symbol,
.hljs-attribute {
  color: #66d9ef;
}




.hljs-params,
.hljs-class .hljs-title {
  color: #f8f8f2;
}




.hljs-string,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-selector-id,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition,
.hljs-variable,
.hljs-template-variable {
  color: #e6db74;
}

.hljs-comment,
.hljs-deletion,
.hljs-meta {
  color: #75715e;
}


标签:markdown,color,margin,默认,font,hljs,mybase,border,pl
来源: https://www.cnblogs.com/cchulu/p/14436996.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有