#

WE ARE SHARING

OUR EXPERIANCE.

BELIEVE THE POWER OF SHARE

BLOG

CSS3 calc() function

CSS3 calc() function

Derived from calculator. Thanks to this value, the values assigned to css properties (width, height, etc.) can be calculated.

It allows the use of mathematical operations such as addition (+), subtraction (-), multiplication (*), division (/) and module (mode acquisition).

EXAMPLE:

It supports more than one operation as in the following example. Operations are performed by multiplication, division, mode, addition, subtraction.

EXAMPLE:

div{
     width: calc(100% - (((40px*20)/2) + 50px))
}

Firefox is used with -moz- prefix on the browser.

Click the link for the browser compatibility table: https://caniuse.com/#feat=calc