Skip to content

Instantly share code, notes, and snippets.

@thisiszoaib
Created October 29, 2020 07:40
Show Gist options
  • Select an option

  • Save thisiszoaib/b463934063c995bdb4e526468a2769a6 to your computer and use it in GitHub Desktop.

Select an option

Save thisiszoaib/b463934063c995bdb4e526468a2769a6 to your computer and use it in GitHub Desktop.
card flip 2
:host {
display: block;
perspective: 600px;
}
.card {
box-shadow: 10px 10px 43px -18px rgba(0, 0, 0, 0.75);
border-radius: 5px;
height: 300px;
width: 200px;
cursor: pointer;
position: relative;
transform-style: preserve-3d;
}
.face {
display: block;
position: absolute;
width: 100%;
height: 100%;
border-radius: inherit;
backface-visibility: hidden;
> img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: inherit;
}
}
.front {
transform: rotateY(180deg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment