• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Joplin实现样式更改

武飞扬头像
小小工程员
帮助1

1. 首先,参考了一些教程和优秀网址

Joplin实现字体样式更改
CSS色彩管理
CSS教程

2. 效果展示

学新通

3. 使用方法:

Joplin的配置路径:
学新通
userstyle.css内则是可以自己编写的样式表(可以将下面代码拷贝到里面),自行添加的newsprint文件夹则是本次自行放置的字体。

4. 自行更改了一部分颜色,使其在暗主题下能够显示清晰,同时结合了侧边目录。

/*本代码会在我使用过程中不断更新,尽量拷贝使用这个代码到userstyle.css中,且颜色位置我已注释,可自行更改为自己喜欢的颜色*/
/*@time: 2022年6月23日,修改单行注释背景色,使其在暗主题下更明显*/
@font-face {
    font-family: 'PT Serif';
    font-style: normal;
    font-weight: normal;
    src: local('PT Serif'), local('PTSerif-Regular'), url('./newsprint/pt-serif-v9-latin-regular.woff') format('woff');
}
@font-face {
    font-family: 'PT Serif';
    font-style: italic;
    font-weight: normal;
    src: local('PT Serif'), local('PTSerif-Italic'), url('./newsprint/pt-serif-v9-latin-italic.woff') format('woff');
}

@font-face {
    font-family: 'PT Serif';
    font-style: normal;
    font-weight: bold;
    src: local('PT Serif'), local('PTSerif-Bold'), url('./newsprint/pt-serif-v9-latin-700.woff') format('woff');
}

@font-face {
    font-family: 'PT Serif';
    font-style: italic;
    font-weight: bold;
    src: local('PT Serif'), local('PTSerif-BoldItalic'), url('./newsprint/pt-serif-v9-latin-700italic.woff') format('woff');
}


html {
    font-size: 16px;
    color: #1f0909;
}

body {  
    font-family: "PT Serif", 'Times New Roman', Times, serif;
    /*-webkit-font-smoothing: antialiased;*/
    line-height: 1.6rem;
    /*font-size: 0.5rem*/
    letter-spacing: 0;
    margin: 0;
    overflow-x: hidden;
    color: #F4F5F0;  /*body,文本颜色*/
}

p{
    font-size: 1.0rem
}
ol,ul{  /*ol:有序列表, ol:无序列表 */
    font-size: 1.0rem
}

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

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


a {   /*a :链接属性*/
    color: #FF6900;
    font-weight: 600;
    padding: 0 2px;
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {   /*标题*/
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
	color: #72D1DF;  /*标题颜色。蓝绿色*/
}

h1 tt,
h1 code {
    font-size: inherit !important;
}

h2 tt,
h2 code {
    font-size: inherit !important;
}

h3 tt,
h3 code {
    font-size: inherit !important;
}

h4 tt,
h4 code {
    font-size: inherit !important;
}

h5 tt,
h5 code {
    font-size: inherit !important;
}

h6 tt,
h6 code {
    font-size: inherit !important;
}

/*下面是标题链接的颜色*/
h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a{
    /*color: #42b983;*/
    color: #9AFF1C;
}

h1 {
    padding-bottom: .4rem;
    font-size: 1.8rem;
    line-height: 1.3;
    font-style: normal;
    border-bottom: none;
}

h2 {
    font-size: 1.6rem;
    line-height: 1.225;
    margin: 35px 0 15px;
    padding-bottom: 0.5em;
    border-bottom: 1px solid #ddd;
    font-style: normal;
}

h3 {
    font-size: 1.4rem;
    /*line-height: 1.43;*/
    margin: 20px 0 7px;
    font-style: normal;
}

h4 {
    font-size: 1.3rem;
    font-style: normal;
}

h5 {
    font-size: 1.2rem;
    font-style: normal;
}

h6 {
    font-size: 1.1rem;
    /*color: #777;*/
    font-style: normal;
}

p,
blockquote,
ul,
ol,
dl,
table {  /*table:表格*/
    margin: 0.8em 0;
}

li > ol,
li > ul {
    margin: 0 0;
}

p pre {
    border: none;
}

hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    /* background-color: #e7e7e7; */
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

body > h2:first-child {
    margin-top: 0;
    padding-top: 0;
}

body > h1:first-child {
    margin-top: 0;
    padding-top: 0;
}

body > h1:first-child   h2 {
    margin-top: 0;
    padding-top: 0;
}

body > h3:first-child,
body > h4:first-child,
body > h5:first-child,
body > h6:first-child {
    margin-top: 0;
    padding-top: 0;
}

a:first-child h1,
a:first-child h2,
a:first-child h3,
a:first-child h4,
a:first-child h5,
a:first-child h6 {
    margin-top: 0;
    padding-top: 0;
}

h1 p,
h2 p,
h3 p,
h4 p,
h5 p,
h6 p {
    margin-top: 0;
}

li p.first {
    display: inline-block;
}

ul,
ol {
    padding-left: 30px;
}

ul:first-child,
ol:first-child {
    margin-top: 0;
}

ul:last-child,
ol:last-child {
    margin-bottom: 0;
}

blockquote {
    border-left: 4px solid #42b983;
    /*padding: 10px 10px;*/
    color: #2B3F52;
    background-color: #0033A0;  /*块引用*/
    border-left-color: #ECF0F3;
}

p code{
    border: none !important;
    color: #ff6666;
    background-color: #0033A0 !important;  /*单行,代码块背景色*/
    /*border: none;*/
}

strong {

    color:#FF9933;    /*加粗字体颜色*/

    size: 100px;

    margin: 0em;

    font-size: inherit;

    /*font-style: italic;*/

}

@media print {
    html {
        font-size: 13px;
    }

    table,
    pre {
        page-break-inside: avoid;
    }

    pre {
        word-wrap: break-word;
    }
    h1,h2,h3,h4,h5,h6 {
    	color: #336699;
    	page-break-inside: avoid;
    	page-break-after: avoid;
    }
    img { 
     page-break-inside:avoid;
     page-break-after:avoid;
 	}
 	table,pre { page-break-inside:avoid}
    ul,ol,dl{ page-break-before:avoid}
    a{page-break-inside:avoid}
    blockquote {page-break-inside: avoid;}
}

/* 侧边栏效果 */
nav.table-of-contents>ul {
    top: 0;
    right: 0;
    position: fixed;
    z-index: var(--z-toc);
    background: var(--dark-grey);
    padding: var(--base-size-8);
    border-radius: var(--base-size-4);
    max-width: 30%;
    font-size: var(--base-size-10);
    max-height: var(--base-size-272);
    overflow: scroll;
    opacity: 0.6;
}

nav.table-of-contents ul {
    list-style-type: none;
    margin-left: var(--base-size-4);
}

nav.table-of-contents li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
}

nav.table-of-contents li a {
    padding: 0;

}

@media all and (min-width: 920px) {
    nav.table-of-contents>ul {
        height: 100%;
        max-height: 100%;
    }

    #rendered-md {
        width: 75%;
    }
}


学新通

5. 打包地址:

可以自行下载放入上面所述的joplin路径文件入口:
(yunpan链接:https://pan.百度.com/s/1kWxH3k0YinPrLvZEB3bshA?pwd=3tg9
提取码:3tg9
–来自百度网盘超级会员V8的分享)
(
cadn:https://download.csdn.net/download/qq_20467929/85748956
)

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgbcjia
系列文章
更多 icon
同类精品
更多 icon
继续加载