CSS pow() Function
Example
Use pow() to scale text in different <div> elements:
div.a {
font-size: calc(18px * pow(1.5, 2));
}
div.b {
font-size: calc(18px * pow(1.5, 1));
}
div.c {
font-size:
calc(18px * pow(1.5, 0));
}
div.d {
font-size: calc(18px *
pow(1.5, -1));
}
Try it Yourself »
Definition and Usage
The CSS pow()
function returns the value of
a number (x) raised to the power of another number (y) (Xy).
Version: | CSS4 |
---|
Browser Support
The numbers in the table specify the first browser version that fully supports the function.
Function | |||||
---|---|---|---|---|---|
pow() | 120 | 120 | 118 | 15.4 | 106 |
CSS Syntax
pow(x, y)
Value | Description |
---|---|
x | Required. A number (the base) |
y | Required. A number (the exponent) |
Related Pages
CSS reference: CSS acos() function.
CSS reference: CSS asin() function.
CSS reference: CSS atan() function.
CSS reference: CSS atan2() function.
CSS reference: CSS calc() function.
CSS reference: CSS cos() function.
CSS reference: CSS exp() function.
CSS reference: CSS hypot() function.
CSS reference: CSS log() function.
CSS reference: CSS mod() function.
CSS reference: CSS sin() function.