Search within TutorialsPark

CSS3 transform Property


To specify how an element is to be transformed


Definition and Notes.

1. The CSS3 transform property is used specify one or multiple transformation functions for a given element.

2.The transformation can happen is a 2D or 3D space, depending upon how its applied.


Syntax:

CSS transform property. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note-Try for as many positive ,negative or decimal values

Property Values

Value Description
none Removes all inherited values, its the default
matrix(n,n,n,n,n,n) Prevents browser from automatically wrapping the text.
matrix3d(n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n) Preserves all the spaces and new lines.
translate(x,y) Whitespaces are preserved and text wraps to make line fit or when a line break is encountered.
translate3d(x,y,z) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
translateX(x) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
translateY(y) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
translateZ(z) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
scale(x,y) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
scale3d(x,y,z) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
scaleX(x) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
scaleY(y) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
scaleZ(z) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
rotate(angle) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
rotate3d(x,y,z) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
rotateX(angle) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
rotateY(angle) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
rotateZ(angle) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
skewX(angle) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
skewY(angle) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.
perspective(n) Whitespaces are collapsed and text wraps to make line fit or when a line break is encountered.

Specifications

Specs Value
Name transform
Value none | <transform-function> [<transform-function>]*
Initial Value normal
Applies to Block and inline-level Elements
Javascript syntax object.style.transform="translate(200px)"
Inherited No
Computed Value Same as declared Value
Browser Support internetexplorer safari firefox opera chrome

Related Examples.