想要在typora特定主题下加入背景图片,需要改主题的css文件,具体步骤如下:
- 打开typora文件夹,在
themes
文件夹下创建image
目录 - 将png格式图片移到
image
目录当中 - 打开目前所用主题的
.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%;
其他按照原配置就好。