1
2
3
.letters { transform: translate(-90px, 300px) rotate(50deg) scale(.7, .9) skew(15deg); }
selector { transform: none | <transFunc()> [<transFunc()>]; }
transform: translate(100px, 100px);
transform: translateX(100px);
transform: translateY(100px);
transform: rotate(90deg);
transform: scale(0.25, 0.75);
transform: scale(0.75);
transform: scaleX(0.25);
transform: scaleY(0.75);
transform: skewX(5deg);
transform: skewY(5deg);
transform: skewX(5deg) skewY(5deg);
transform: skew(5deg,5deg);
transform: translate(-80px, 200px);
transform: rotate(15deg);
transform: scale(1.5, 2);
transform: skewX(-8deg);
transform: translate(-80px, 200px) rotate(-15deg) scale(2, 1.5) skewX(8deg);
transform-origin
Order of transform functions matters: if you rotate first, your translate direction will be on the rotated axis!
translateX(200px)
rotate(135deg)
transforms: perspective(value)
except it applies to the positioned or transformed children of the element, not the element itself.transform: perspective(100) ...
perspective: 100
Difference: with the parent property, all the transformed elements share the same perspective. with the function, each transformed element has it's own perspective.
perspective()
transform: perspective(40px) rotateX(10deg);
The perspective()
function must come first
Smaller numbers have a bigger impact
perspective
Propertytransform: perspective(400px)
v. perspective: 400px
transform: perspective(400px)
on children
perspective: 400px
on parent
perspective-origin: x y
perspective
property. perspective-origin
with perspective: 400px
perspective-origin: 0 0
on parent
only works if perspective
is on that parent!
transform: perspective(40px) rotateX(10deg);
transform-origin: top left;
Specifies the x and y position of the origin, relative to the transform object.
transform: rotate(90deg);
transform-origin: top left;
transform-style
PropertyFuture: Defines the layout box, to which the transform
and transform-origin
properties relate to. (FF, Ch 64, O 51)
border-box
fill-box
view-box
viewBox
attribute exists, the reference box is at the viewBox
0 0, and the width and height are those of the viewBox
attribute.