variable in csss code example
Example 1: css variable
:root {
--main-bg-color: pink;
}
body {
background-color: var(--main-bg-color);
}
Example 2: create variable in css
:root {
--tab-count: 5;
}
#div1 {
width: calc(100% - var(--tab-count));
}