If you have any query feel free to chat us!
Happy Coding! Happy Learning!
CSS variables, also known as custom properties, allow developers to define reusable values in CSS that can be used throughout a stylesheet. These variables are defined using the --
prefix, followed by a name and value. For example:
cssCopy code
:root {
--primary-color: #007bff;
--secondary-color: #6c757d;
}
In this example, --primary-color
and --secondary-color
are defined as CSS variables with their respective color values. These variables can then be used in the stylesheet wherever those colors are needed, like so:
cssCopy code
button {
background-color: var(--primary-color);
color: var(--secondary-color);
}
In addition to simplifying the process of defining and reusing values, CSS variables also offer some other benefits:
Overall, CSS variables can help simplify the process of creating and maintaining CSS code, and offer a more flexible and dynamic approach to defining values in a stylesheet.
Comments: 2
I am not able to access videos from second class and further. I have already completed first class
When will I get my course?
Now, Your query was resolved.