mac环境下vscode添加背景图片

一:安装background插件

二:在mac版本的vsCode中依次选中Code->首选项->设置; 然后在settings中选中

三:在右侧的“用户设置”的括号中加上以下代码:

"backgroung.enable":true,
        "background.useDefault":false,
        "background.customImages":[            "file:///Users/Gpf/Desktop/yinhun.jpeg"        ],
        "background.style":{
            "content":"''",
            "pointer-events":"none",
            "position":"absolute",
            "top":"0",
            "right":"0",
            "width":"100%",
             "height":"100%",
            "z-index":"99999",
            "background.repeat":"no-repeat",
           "background-size":"contain",
            "opacity":0.1
        }
  • 注:Mac端直接放图片地址是不行的,前面要加上file://才可以正常显示
原文地址:https://www.cnblogs.com/GoodmorningMr/p/10041525.html