Transform function for a 2d translation which moves an element on the y-axis by the given value. Note that the y-axis increases vertically downwards: positive lengths shift the element down, while negative lengths shift it up.
SyntaxtranslateY( <translation-value> )
Parameterstranslation-value
Value for the translation across the y-axis. Can be a length or a percentage value.
ExamplesThe example shows three div elements, that are transformed individually with the translateY() function.
.element-1 {
transform: translateY(10px);
}
.element-2 {
transform: translateY(-20px);
}
.element-3 {
transform: translateY(50%);
}
See also Related articles Transforms
translateY()
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