Answers for "create variable in css"

CSS
52

css set variable

:root {
  --main-bg-color: coral;
}

#div1 {
  background-color: var(--main-bg-color);
}

#div2 {
  background-color: var(--main-bg-color);
}
Posted by: Guest on December-27-2019
1

create variable in css

:root {
  --tab-count: 5;
}

#div1 {
  width: calc(100% - var(--tab-count));
}
Posted by: Guest on October-13-2020

Browse Popular Code Answers by Language