translateZ()

The CSS translateZ() function adds depth to an element, drawing it closer or farther in space. In other words, it shifts an element along the Z-axis in a 3D space. .box:hover { transform: translateZ(100px); } .box.perspective:hover { transform: perspective(500px) translateZ(100px); } Either the perspective() function or perspective property is necessary for translateZ() to work. Read more…

translateY()

The CSS translateY() function shifts an element vertically by the specified amount. Specifically, it shifts an element either up or down, depending on whether the value is positive or negative. .parent:hover .box { transform: translateY(50%); /* Shift down by half the element’s height */ } CodePen Embed Fallback Along with other transform Read more…

translateX()

The CSS translateX() function shifts an element horizontally by the specified amount. Specifically, it displaces an element to the right or the left, depending on whether the value is positive or negative. .parent:hover .box { transform: translateX(50%); } CodePen Embed Fallback Along with other transform functions, it is used inside the transform property. It Read more…

translate()

The CSS translate() function shifts an element from its default position on a two-dimensional plane. This way, we can reposition an element horizontally, vertically, or both. .parent:hover .box { transform: translate(50px, 50%); } Hover over the box to see it move 50% of its width towards the left: CodePen Embed Fallback Along Read more…

Prop For That

No secret that Adam’s all about props. Dude gave us Open Props a good while back for a slew of preconfigured variables for color, shadows, sizing, typography, among much much more. Now he’s back with Prop For That, a similar sorta idea, but mind-blowing in the sense that it creates Read more…