📜  hex rgba 在反应内联样式中是否工作 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:51.152000             🧑  作者: Mango

代码示例1
const blueColor = '#2c8da9';
const oBlueColor = blueColor+'33'; // 0.2 opacity added

document.getElementById('one').style.backgroundColor = blueColor;
document.getElementById('two').style.backgroundColor = oBlueColor;