Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

CSS values and units

Every CSS declaration consists of a property/value pair. The value can take various forms depending on the property, such as a single integer, keyword, function, or a combination of different items; some values have units, while others do not. Every property also accepts the CSS-wide values. The CSS values and units module defines the data types — values and units — that CSS properties accept. This module also defines the CSS value definition syntax, or formal grammar, used to define the set of valid values for every CSS property and function.

Reference

Properties

Functions

Additional functions, includingcalc-mix(),crossorigin(),first-valid(),if(),integrity(),progress(),random(),random-item(),referrerpolicy(),src(),type(), andtoggle(), are defined in the specifications, but not yet implemented in browsers.

Data types

Units

Flex units (fr) andcontainer units (cqb,cqh,cqi,cqmax,cqmin,cqw) are defined in theCSS grid layout andCSS conditional rules modules, respectively.

Unit categorizations

Key concepts

Guides

CSS data types

Introduction to CSS data types that define typical values accepted by CSS properties and functions.

Numeric data types

Overview of the numeric data types, including integers, numbers, percentages, and dimensions, along with relative and absolute dimensions, angles, and time units.

Textual data types

Overview of the textual data types, including pre-defined keyword values, global CSS keyword values, and URLs.

CSS value functions

Overview of the CSS statements that invoke special data processing or calculations to return a CSS value for a CSS property.

Using CSS math functions

The CSS math functions that allow a property value to be written as a mathematical expression.

Value definition syntax

The formal grammar used to define the set of valid values for CSS properties and functions.

Learn: Values and units

A look at some of the most frequently used value types, what they are, and how they work.

Related

Specifications

Specification
CSS Values and Units Module Level 3
CSS Values and Units Module Level 4
CSS Values and Units Module Level 5

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp