Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
If I understand your question, no. HTML elements have a style property, where you can change its properties, but you can't manipulate the CSS itself. You can imitate CSS with JS though: CSS: .red { background: red; } JS: for (let i of document.querySelectorAll(".red").forEach(i => {i.style.background = "red"});
4th Jul 2019, 5:28 PM
Airree
Airree - avatar