Workaround for CSS variables in IE?

后端 未结 10 1796
Happy的楠姐
Happy的楠姐 2020-12-13 17:02

I\'m currently developing a web application in Outsystems in which I have the need to customize the CSS, in which I\'m using variables. I need to guarantee the app works cro

10条回答
  •  旧时难觅i
    2020-12-13 17:55

    body {
      --text-color : red; /* --text-color 정의 */
    }    
    
    body {
       color: var(--text-color, red); /* --text-color 정의되지 않으면 red로 대체됨 */
    }
    
    body {
       color: var(--text-color, var(--text-color-other, blue));
       /* --text-color, --text-color-other 가 정의되지 않으면 blue로 대체됨 */
    }
    

提交回复
热议问题