Transform function for a 2d translation which sets the position of an element to a new one, described by two vectors (x, y). The y value is optional.
Syntaxtranslation-value-x
Value for the translation across the x-axis. Can be a length value or a percentage value. Value for the y-axis translation is assumed to be zero.
translation-value-x, translate-value-y
First value describes the translation across the x-axis, the second across the y-axis. Values can be a length or a percentage value.
ExamplesThe example shows three div elements, that are transformed individually with the translate() function.
.element-1 {
transform: translate(0, 0);
}
.element-2 {
transform: translate(20px);
}
.element-3 {
transform: translate(40px, 80px);
}
See also Related articles Transforms
translate()
Microsoft Developer Network: [Windows Internet Explorer API reference Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4