IT. Expert System.

CSS

calc()


Description

The calc() function is used to apply math operations to length values.

This function has the form:

calc(v1 operator v2)

Arguments

Name Description
v1 Specifies the first value
operator

Specifies the operator. Value operators include:

+
Addition

-
Subtraction

*
Multiplication

/
Division

mod
Modulus

v2 Specifies the second value

Examples

This example shows how to calculate the length values for the margin property:

p {
  margin:
calc(1rem - 2px)
calc(1rem - 1px) }

In this example, the top and bottom margins are calculated as two pixels less than the font size of the root element. The left and right margins as one pixel less than the font size of the root element.

Browser Support

Chrome Firefox IE Safari Opera

Miscellaneous Information

Defined In: CSS3


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1203 / . Delta: 0.00647 с