function moneyColorChange(){
const root = document.querySelector(':root');
const color = getComputedStyle(root).getPropertyValue('--money-color').trim();
root.style.setProperty('--money-color', color === 'red' ? 'blue' : 'red');
复制代码
-
3533
-
JowayYoung
JavaScript
-
2.1w
-
gostfather
JavaScript
-
1658
-
ZoeeeZhang
JavaScript