In CSS, when a single parameter is passed, the natural logarithm
e, or approximately
2.7182818, is used, though the base can be set to any value with an optional second parameter.
/* A <number> value */ width: calc(100px * log(7.389)); /* 200px */ width: calc(100px * log(8, 2)); /* 300px */ width: calc(100px * log(625, 5)); /* 400px */
log(value [, base]?) function accepts two comma-separated values as its parameters.
A calculation which resolves to a
<number>greater than or equal to 0. Representing the value to be logarithmed.
Optional. A calculation which resolves to a
<number>greater than or equal to 0. Representing the base of the logarithm. If not defined, the default logarithmic base
The logarithm of
base is defined.
The natural logarithm (base
base is not defined.
log( <calc-sum> , <calc-sum>? )
<calc-product> [ [ '+' | '-' ] <calc-product> ]*
<calc-value> [ [ '*' | '/' ] <calc-value> ]*
( <calc-sum> )
|CSS Values and Units Module Level 4 |
BCD tables only load in the browser