DEV Community

Calvin
Calvin

Posted on

Reading Snippets [52 => CSS] 🎨

Calc() can be used in CSS to perform math operations on values.

It can be used for performing different calculations, including adding and subtracting values, using percentages.

For example:



div {
max-width: calc(80% - 100px)
}


Enter fullscreen mode Exit fullscreen mode

Flavio Copes,The CSS Handbook

Top comments (0)