Detailed introduction to mathematical expression calc() in css

王林
Release: 2020-04-08 09:12:37
forward
3125 people have browsed it

Detailed introduction to mathematical expression calc() in css

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 can be mixed with %, px, em, and rem. Calculate with other units

Compatibility: IE8-, safari5.1-, ios5.1-, android4.3- are not supported, android4.4-4.4.4 only supports addition and subtraction. IE9 does not support backround-position

(recommended tutorial:CSS tutorial)

Note: There must be whitespace characters on both sides of the and-operator

Examples are as follows:

 
测试文字一
测试文字二
Copy after login

Application

Mathematical expression calc() is often used for numerical operations in different units in layout

 

left

right

right

Copy after login

Related video tutorials Recommended:css video tutorial

The above is the detailed content of Detailed introduction to mathematical expression calc() in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!