CSS variable first chapter!
🚩 Atul Prajapati 🇮🇳
Posted on March 9, 2021
Hey, there coding people,
As you might know, I have started learning CSS variables from scrimba and this is my first post about CSS variables.
I this post you can see I have used CSS variable for this basic web page.
First of all, you have to initialize your CSS variable in the global scope which we can use anywhere in our entire project.
Global scope
:root
{
--black-color: #000;
}
use it like this
.selector-name
{
color: var(--black-color);
}
Check out this codepen for more understanding.
💖 💪 🙅 🚩
🚩 Atul Prajapati 🇮🇳
Posted on March 9, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.