Skip to content

Instantly share code, notes, and snippets.

@moxdev
Created April 5, 2018 15:22
Show Gist options
  • Save moxdev/cc37ff85d4ce7f165f14ed8af8df583b to your computer and use it in GitHub Desktop.
Save moxdev/cc37ff85d4ce7f165f14ed8af8df583b to your computer and use it in GitHub Desktop.
Stop Transform of other element when using transform scale on a different element
-webkit-backface-visibility: hidden;
-webkit-transform: translateZ(0) scale(1.0, 1.0);
transform: translateZ(0);
@moxdev
Copy link
Author

moxdev commented Apr 5, 2018

`.btn {
-webkit-appearance: none;
transition: all .2s ease-in-out;

&:hover {
transform: scale(1.1);
}`

Using transform scale on hover on a link was cause element above link to transform as well. Add the stop-transform code to them element and it will no longer jump on hover of button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment