CSS scale Property

❮ Previous Reference Next ❯

Example

div {
  float: left;
  margin: 1em;
  width: 7em;
  line-height: 7em;
  text-align: center;
  transition: 0.5s ease-in-out;
  border: 4px dotted #1A73E8;
}

#box1:hover {
  scale: 1.25;
}

#box2:hover {
  scale: 1.25 0.75;
}





Hello

Meaning:

The scale CSS property specify scale transforms individually and independently of the transform property.

This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the transform value.

Default value:none
Inherited:No
Animatable:No
Version:CSS3
JavaScript syntax:
object.style.scale="none|Single value|Two values|Three values|initial|inherit|revert|revert-layer|unset";



Standard Syntax

scale: none|Single value|Two values|Three values|initial|inherit|revert|revert-layer|unset;



Browser Support




Status







Property Values

The following table describes the values of this property:

Value Description
none Specifies that no scaling should be applied.
Single value A number or percentage specifying a scale factor to make the affected element scale by the same factor along both the X and Y axes. Equivalent to a scale() (2D scaling) function with a single value specified.
Two values Two number or percentage values that specify the X and Y axis scaling values (respectively) of a 2D scale. Equivalent to a scale() (2D scaling) function with two values specified.
Three values Three number or percentage values that specify the X, Y, and Z axis scaling values (respectively) of a 3D scale. Equivalent to a scale3d() (3D scaling) function.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element animation-delay property.
revert Reverts the cascaded value of the property from its current value to the value the property
revert-layer Rollback styles to the ones specified in previous cascade layers.
unset Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.



Default CSS Property Values

selectors {
  scale: none;
}
❮ Previous Reference Next ❯