The vsCode configuration automatically completes the css compatibility code and solves the invalidity of Autoprefixer 3.0

problem:

Use the vsCode editor to configure Autoprefixer3.0 to fail to automatically complete the compatibility code

Solution:

Changed Autoprefixer3.0 to 2.0 version, and sorted out the results of web surfing, finally found a solution, and carried out the following steps to verify. One talks about one, discuss with each other if there is a problem, don't spray! ! !
ps. If a code friend finds a solution for Autoprefixer3.0 version, welcome to communicate

Solution steps:
  1. First set up the node.js environment (Du Niang will have it when she finds it)
  2. Open vsCode to search for Autoprofixer. Generally, it is the latest version by default. You need to download the new version before replacing version 2.2.0 (Note: Remember to reload after replacement!!!)
    Insert picture description here
  3. After installation, you need to find Autoprefixer in Preferences> Settings> Extensions, enter setting.json, and set the following code
    Insert picture description here
"autoprefixer.browsers": [
        // "last 9 versions", 
        "ie >= 6",  //ie6以上
        "firefox >= 8",
        "chrome >= 24",
        "Opera>=10"
    ]
  1. Open the terminal (cthl + `), enter the code
npm i -D autoprefixer
npm i -g autoprefixer

Insert picture description here

  1. Close the vsCode software. Right click on the single machine to set properties> compatibility, select "run this program as an administrator"
    Insert picture description here
  2. Double-click to open the software test, select the css file, press ctrl+shift+p, and then select Autoprefixer, it can be automatically completed
    Insert picture description here
    Insert picture description here

problem:

Use the vsCode editor to configure Autoprefixer3.0 to fail to automatically complete the compatibility code

Solution:

Changed Autoprefixer3.0 to 2.0 version, and sorted out the results of web surfing, finally found a solution, and carried out the following steps to verify. One talks about one, discuss with each other if there is a problem, don't spray! ! !
ps. If a code friend finds a solution for Autoprefixer3.0 version, welcome to communicate

Solution steps:
  1. First set up the node.js environment (Du Niang will have it when she finds it)
  2. Open vsCode to search for Autoprofixer. Generally, it is the latest version by default. You need to download the new version before replacing version 2.2.0 (Note: Remember to reload after replacement!!!)
    Insert picture description here
  3. After installation, you need to find Autoprefixer in Preferences> Settings> Extensions, enter setting.json, and set the following code
    Insert picture description here
"autoprefixer.browsers": [
        // "last 9 versions", 
        "ie >= 6",  //ie6以上
        "firefox >= 8",
        "chrome >= 24",
        "Opera>=10"
    ]

Guess you like

Origin blog.csdn.net/weixin_46034375/article/details/108699055