An in-depth analysis of the mathematical expression calc() in CSS

青灯夜游
Release: 2021-02-03 11:04:16
forward
1370 people have browsed it

An in-depth analysis of the mathematical expression calc() in CSS

[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:

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

Application

The mathematical expression calc() is often used for numerical operations in different units in the layout

 

left

right

right

Copy after login

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!

Related labels:
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!