[Record] How to change the background of typora

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:

  1. Open the typora folder and create a directory themesunder the folderimage
  2. Move the png format image to imagethe directory
  3. Open the file of the currently used theme .cssand 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.

Guess you like

Origin blog.csdn.net/yaoyao_chen/article/details/129209470