If you want to add a background image to a typora-specific theme, you need to change the theme's css file. The specific steps are as follows:
- Open the typora folder and create a directory
themes
under the folderimage
- Move the png format image to
image
the directory - Open the file of the currently used theme
.css
and add the background image configuration in #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;
}
Add a background picture: background-image: url(./image/IMAGENAME.png);
If you want the picture to repeat, background-repeat: repeat
if you want the picture to be placed on top, then background-position: top;
adjust the transparency, opacity: 0.7;
between 0-1, 1 means opaque, 0 means transparent.
If you want a complete picture, background-size: 100%;
other configurations should be done according to the original configuration.