CSS - scaleY()

The scaleY() CSS function modifies the ordinate of each element point by a constant factor except if this scale factor is 1, in which case the function is the identity transform. The scaling is not isotropic and the angles of the element are not conserved.

Examples

HTML

HTML
<p>foo</p>
<p class="transformed">bar</p>

CSS

CSS
p {
width: 50px;
height: 50px;
background-color: teal;
}

.transformed {
transform: scaleY(2);
background-color: blue;
}

CSS
scaleY(s)

Description

The scaleY() CSS function modifies the ordinate of each element point by a constant factor except if this scale factor is 1, in which case the function is the identity transform. The scaling is not isotropic and the angles of the element are not conserved. scaleY(sy) is a shorthand for scale(1, sy) or for scale3d(1, sy, 1).

scaleY(-1) defines an axial symmetry with a horizontal axis passing by the origin (as specified by the transform-origin property).

s
Is a <number> representing the scaling factor to apply on the ordinate of each point of the element.
Cartesian coordinates on ℝ2 Homogeneous coordinates on ℝℙ2 Cartesian coordinates on ℝ3 Homogeneous coordinates on ℝℙ3
$\left(\begin{array}{c}10\\ 0& s\end{array}\right)$ $\left(\begin{array}{cc}10& 0\\ 0s& 0\\ 0& 0& 1\end{array}\right)$ $\left(\begin{array}{cc}10& 0\\ 0s& 0\\ 0& 0& 1\end{array}\right)$ $\left(\begin{array}{ccc}10& 0& 0\\ 0s& 0& 0\\ 0& 0& 1& 0\\ 0& 0& 0& 1\end{array}\right)$
[1 0 0 s 0 0]