CSS3 dynamically calculated --calc ()

Calc () function is used to dynamically calculate the length value.

It is noted that, before and after the operator needs to leave a space, for example: width: calc (100% - 10px);
any length values may be used Calc () function is calculated;
Calc () function supports "+", "- "," * "," / "operation;
Calc () function uses the standard math precedence rules;
Note:

width: calc (100% -100px); - not work

width: calc (100% - 100px); - can be used

Calc () value is calculated in two spaces must exist between the same arithmetic sign, otherwise no effect

Published 452 original articles · won praise 83 · views 270 000 +

Guess you like

Origin blog.csdn.net/caseywei/article/details/103251594