Daily Quest #3 | Code With Marish 😎|How to update CSS variables using Javascript?

Pubblicato il: 06 febbraio 2022
sul canale di: Code With Marish
91
0

Hello There 👋, Welcome to my channel Code With Marish We will be having a very short video daily where I will answer one common question related to web development. If you wish to answer your question related to web development please drop a comment and I will definitely answer it either through comment or video.

This is our third daily quest, here I am answering a question on

How to update CSS variables using Javascript?

Below we have CSS variable and we will update this value to 20px

file: style.css

:root{
--width: 10px;
}

file: main.js
var root = document.querySelector(":root");
root.style.setProperty('--width', '20px');


Interested in reading blogs, please visit my blog at
https://codewithmarish.com/

Music: www.bensound.com / Royalty Free Music from Bensound

#codewithmarish #webdev #daily_quest #daily_quest_3


In questa pagina del sito puoi guardare il video online Daily Quest #3 | Code With Marish 😎|How to update CSS variables using Javascript? della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Code With Marish 06 febbraio 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 91 volte e gli è piaciuto 0 spettatori. Buona visione!