[Recommended tutorial:CSS video tutorial]
The mathematical expression calc() is a function in CSS, mainly used for mathematical operations. Using calc() provides convenience and new ideas for page element layout.
Definition
The mathematical expression calc() is the abbreviation of calculate. It allows the use of four operators, -, * and /. Mixed use of %, px, em, rem and other units for calculation
Compatibility: IE8-, safari5.1-, ios5.1-, android4.3- are not supported, android4.4-4.4.4 only Addition and subtraction are supported. IE9 does not support backround-position
Note: There must be whitespace characters on both sides of the and-operator
The example is as follows:
测试文字一测试文字二
Application
The mathematical expression calc() is often used for numerical operations in different units in the layout
left
right
right
For more computer programming related knowledge, please visit:Programming Teaching! !
The above is the detailed content of An in-depth analysis of the mathematical expression calc() in CSS. For more information, please follow other related articles on the PHP Chinese website!