Skip to content

Instantly share code, notes, and snippets.

@marcusig
Created March 14, 2024 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcusig/bbd53860d33f8173ddbfb78ff31253ff to your computer and use it in GitHub Desktop.
Save marcusig/bbd53860d33f8173ddbfb78ff31253ff to your computer and use it in GitHub Desktop.
.mkl_pc .mkl_pc_container .mkl_pc_viewer .mkl_pc_layers img.bezel:not(.active) {
transform: translateX(calc(-50% - 300px)) translateY(-50%);
}
.mkl_pc .mkl_pc_container .mkl_pc_viewer .mkl_pc_layers img.bezel.active ~ img.bezel:not(.active) {
transform: translateX(calc(-50% + 300px)) translateY(-50%);
}
@marcusig
Copy link
Author

In order to create the animation as seen on this demo, add the CSS class bezel to the layer, and use the above CSS.

What it does:

  • a non-active image moves left
  • non-active images after the active image move to the right
  • (The active image doesn't have any position change)

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