CSS - Maths Functions

CSS Maths Functions

In this tutorial, I will be showing you few maths functions that you can use in CSS.

  • calc()
  • max()
  • min()
  • mod()

calc() - performs calculation based on expression given. It takes operations +, -, *, /

max() - uses the largest value, form multiple separated values. Each value is separated by a comma.

min() - uses the smallest value, form multiple separated values. Each value is separated by a comma.

mod() - uses the remainder left when a number is divided by another number. The syntax is as follows: mod(dividend, divisor)

For more maths functions, see Maths Function References

ADVERTISEMENTS

LEARNING IS A CONTINOUS PROCESS - PRACTICE MAKES PERFECT