我的目标是仅在dekstop上查看页面时,才通过CSS将淡出效果赋予3个元素。所以我尝试了即使在移动设备上也可以使用的代码,我不知道为什么width函数不起作用。你能帮我吗?
this.specVars = {
taxinfoFormHelpTitle4 : 'title 4',
taxinfoFormHelpTitle5 : 'title 5',
taxinfoFormHelpTitle6 : 'title 6',
cityMissing : 'error city',
rgba_000000 : "rgba(0, 0, 0, 1)", //Black
rgba_000000_0 : "rgba(0, 0, 0, 0)", //Transparent
rgba_222222 : "rgba(34, 34, 34, 1)", //Dark gray
rgba_2ba6cb : "rgba(43, 166, 203, 1)",
rgba_336699 : "rgba(51, 102, 153, 1)", //Blue
bold : "700" };
var colors = this.specVars;
var keys = Object.keys(colors);
for (var key of keys){
if(colors[key].includes('rgba') && colors[key].includes(', 1)')){
colors[key]= colors[key].replace(', 1)', ')');
colors[key] = colors[key].replace('rgba', 'rgb');
};
}
console.log(colors)