【记录】typora如何更换背景

想要在typora特定主题下加入背景图片,需要改主题的css文件,具体步骤如下:

  1. 打开typora文件夹,在themes文件夹下创建image目录
  2. 将png格式图片移到image目录当中
  3. 打开目前所用主题的.css文件,在#write{}中加入背景图片配置
#write {
    
    
    /* background: #131b29; */
    background-image: url(./image/IMAGENAME.png);
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: bottom;
    /* color: #a9aaab; */
    margin: 0 auto;
    max-width: 860px;
    padding: 30px;
    padding-bottom: 100px;
    /* position: static; */
    /* width: 100%; */
    opacity: 0.7;
}

加入背景图片:background-image: url(./image/IMAGENAME.png);
如果想要图片repeat,则background-repeat: repeat
图片若想放在顶部,则background-position: top;
透明度调整,opacity: 0.7;,0-1之间,1表示不透明,0表示透明。
想要完整图片,则background-size: 100%;
其他按照原配置就好。

猜你喜欢

转载自blog.csdn.net/yaoyao_chen/article/details/129209470