Last active
June 28, 2021 21:13
-
-
Save woodcox/4cf6912cc02b3414398c6c897a71baca to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $secondary-color: orange; | |
| $accent-color: grey; | |
| $primary-color: blue; | |
| $card-font-color: white; | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| -webkit-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } | |
| h1 { | |
| font-size: 2.5rem; | |
| text-align: center; | |
| margin: 2rem 0; | |
| } | |
| .wrapper { | |
| width: 100%; | |
| margin: 0 auto; | |
| max-width: 100rem; | |
| } | |
| .cols { | |
| display: -webkit-box; | |
| display: -ms-flexbox; | |
| display: flex; | |
| -ms-flex-wrap: wrap; | |
| flex-wrap: wrap; | |
| -webkit-box-pack: center; | |
| -ms-flex-pack: center; | |
| justify-content: center; | |
| } | |
| .col { | |
| width: calc(25% - 2rem); | |
| margin: 1rem; | |
| cursor: pointer; | |
| } | |
| .card-container{ | |
| -webkit-transform-style: preserve-3d; | |
| transform-style: preserve-3d; | |
| -webkit-perspective: 1000px; | |
| perspective: 1000px; | |
| } | |
| .front, | |
| .back { | |
| background-size: cover; | |
| box-shadow: 0 4px 8px 0 rgba(0,0,0,0.25); | |
| border-radius: 10px; | |
| background-position: center; | |
| -webkit-transition: -webkit-transform .7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| transition: -webkit-transform .7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| -o-transition: transform .7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| transition: transform .7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| transition: transform .7s cubic-bezier(0.4, 0.2, 0.2, 1), -webkit-transform .7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| -webkit-backface-visibility: hidden; | |
| backface-visibility: hidden; | |
| text-align: center; | |
| min-height: 280px; | |
| height: auto; | |
| border-radius: 10px; | |
| color: $card-font-color; | |
| font-size: 1.5rem; | |
| } | |
| .back { | |
| background: $accent-color; | |
| background: -webkit-linear-gradient(45deg, $accent-color 0%, black 100%); | |
| background: -o-linear-gradient(45deg, $accent-color 0%, black 100%); | |
| background: linear-gradient(45deg, $accent-color 0%, black 100%); | |
| } | |
| .front:after { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| z-index: 1; | |
| width: 100%; | |
| height: 100%; | |
| content: ''; | |
| display: block; | |
| opacity: .6; | |
| background-color: $primary-color; | |
| -webkit-backface-visibility: hidden; | |
| backface-visibility: hidden; | |
| border-radius: 10px; | |
| } | |
| .card-container:hover .front, | |
| .card-container:hover .back { | |
| -webkit-transition: -webkit-transform .7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| transition: -webkit-transform .7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| -o-transition: transform .7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| transition: transform .7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| transition: transform .7s cubic-bezier(0.4, 0.2, 0.2, 1), -webkit-transform .7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| } | |
| .back { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| } | |
| .inner { | |
| -webkit-transform: translateY(-50%) translateZ(60px) scale(0.94); | |
| transform: translateY(-50%) translateZ(60px) scale(0.94); | |
| top: 50%; | |
| position: absolute; | |
| left: 0; | |
| width: 100%; | |
| padding: 2rem; | |
| -webkit-box-sizing: border-box; | |
| box-sizing: border-box; | |
| outline: 1px solid transparent; | |
| -webkit-perspective: inherit; | |
| perspective: inherit; | |
| z-index: 2; | |
| } | |
| .card-container .back { | |
| -webkit-transform: rotateY(180deg); | |
| transform: rotateY(180deg); | |
| } | |
| .card-container .front { | |
| -webkit-transform: rotateY(0deg); | |
| transform: rotateY(0deg); | |
| } | |
| .card-container:hover .back { | |
| -webkit-transform: rotateY(0deg); | |
| transform: rotateY(0deg); | |
| -webkit-transform-style: preserve-3d; | |
| transform-style: preserve-3d; | |
| } | |
| .card-container:hover .front { | |
| -webkit-transform: rotateY(-180deg); | |
| transform: rotateY(-180deg); | |
| -webkit-transform-style: preserve-3d; | |
| transform-style: preserve-3d; | |
| } | |
| .front .inner p { | |
| font-size: 2rem; | |
| margin-bottom: 2rem; | |
| position: relative; | |
| &:after { | |
| content: ''; | |
| width: 4rem; | |
| height: 2px; | |
| position: absolute; | |
| background: $secondary-color; | |
| display: block; | |
| left: 0; | |
| right: 0; | |
| margin: 0 auto; | |
| bottom: -.75rem; | |
| } | |
| } | |
| .front .inner span { | |
| color: rgba( $card-font-color, 0.9); | |
| font-family: 'Sanchez'; | |
| } | |
| @media screen and (max-width: 64rem){ | |
| .col { | |
| width: calc(33.333333% - 2rem); | |
| } | |
| } | |
| @media screen and (max-width: 48rem){ | |
| .col { | |
| width: calc(50% - 2rem); | |
| } | |
| } | |
| @media screen and (max-width: 32rem){ | |
| .col { | |
| width: 100%; | |
| margin: 0 0 2rem 0; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="wrapper"> | |
| <h1>Parallax Flipping Cards</h1> | |
| <div class="cols"> | |
| <div class="col" ontouchstart="this.classList.toggle('hover');"> | |
| <div class="card-container"> | |
| <div class="front" style="background-image: url(https://unsplash.it/500/500/)"> | |
| <div class="inner"> | |
| <p>Diligord</p> | |
| <span>Lorem ipsum</span> | |
| </div> | |
| </div> | |
| <div class="back"> | |
| <div class="inner"> | |
| <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Alias cum repellat velit quae suscipit c.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="col" ontouchstart="this.classList.toggle('hover');"> | |
| <div class="card-container"> | |
| <div class="front" style="background-image: url(https://unsplash.it/511/511/)"> | |
| <div class="inner"> | |
| <p>Rocogged</p> | |
| <span>Lorem ipsum</span> | |
| </div> | |
| </div> | |
| <div class="back"> | |
| <div class="inner"> | |
| <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Alias cum repellat velit quae suscipit c.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="col" ontouchstart="this.classList.toggle('hover');"> | |
| <div class="card-container"> | |
| <div class="front" style="background-image: url(https://unsplash.it/502/502/)"> | |
| <div class="inner"> | |
| <p>Strizzes</p> | |
| <span>Lorem ipsum</span> | |
| </div> | |
| </div> | |
| <div class="back"> | |
| <div class="inner"> | |
| <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Alias cum repellat velit quae suscipit c.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="col" ontouchstart="this.classList.toggle('hover');"> | |
| <div class="card-container"> | |
| <div class="front" style="background-image: url(https://unsplash.it/503/503/)"> | |
| <div class="inner"> | |
| <p>Clossyo</p> | |
| <span>Lorem ipsum</span> | |
| </div> | |
| </div> | |
| <div class="back"> | |
| <div class="inner"> | |
| <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Alias cum repellat velit quae suscipit c.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="col" ontouchstart="this.classList.toggle('hover');"> | |
| <div class="card-container"> | |
| <div class="front" style="background-image: url(https://unsplash.it/504/504/"> | |
| <div class="inner"> | |
| <p>Rendann</p> | |
| <span>Lorem ipsum</span> | |
| </div> | |
| </div> | |
| <div class="back"> | |
| <div class="inner"> | |
| <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Alias cum repellat velit quae suscipit c.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="col" ontouchstart="this.classList.toggle('hover');"> | |
| <div class="card-container"> | |
| <div class="front" style="background-image: url(https://unsplash.it/505/505/)"> | |
| <div class="inner"> | |
| <p>Reflupper</p> | |
| <span>Lorem ipsum</span> | |
| </div> | |
| </div> | |
| <div class="back"> | |
| <div class="inner"> | |
| <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Alias cum repellat velit quae suscipit c.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="col" ontouchstart="this.classList.toggle('hover');"> | |
| <div class="card-container"> | |
| <div class="front" style="background-image: url(https://unsplash.it/506/506/)"> | |
| <div class="inner"> | |
| <p>Acirassi</p> | |
| <span>Lorem ipsum</span> | |
| </div> | |
| </div> | |
| <div class="back"> | |
| <div class="inner"> | |
| <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Alias cum repellat velit quae suscipit c.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="col" ontouchstart="this.classList.toggle('hover');"> | |
| <div class="card-container"> | |
| <div class="front" style="background-image: url(https://unsplash.it/508/508/)"> | |
| <div class="inner"> | |
| <p>Sohanidd</p> | |
| <span>Lorem ipsum</span> | |
| </div> | |
| </div> | |
| <div class="back"> | |
| <div class="inner"> | |
| <p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Alias cum repellat velit quae suscipit c.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| h1 { | |
| font-size: 2.5rem; | |
| text-align: center; | |
| margin: 2rem 0; | |
| } | |
| .wrapper { | |
| width: 100%; | |
| margin: 0 auto; | |
| max-width: 100rem; | |
| } | |
| .cols { | |
| display: -webkit-box; | |
| display: -ms-flexbox; | |
| display: -webkit-flex; | |
| display: flex; | |
| -ms-flex-wrap: wrap; | |
| -webkit-flex-wrap: wrap; | |
| flex-wrap: wrap; | |
| -webkit-box-pack: center; | |
| -ms-flex-pack: center; | |
| -webkit-justify-content: center; | |
| justify-content: center; | |
| } | |
| .col { | |
| width: calc(25% - 2rem); | |
| margin: 1rem; | |
| cursor: pointer; | |
| } | |
| .card-container { | |
| -webkit-transform-style: preserve-3d; | |
| transform-style: preserve-3d; | |
| -webkit-perspective: 1000px; | |
| perspective: 1000px; | |
| } | |
| .front, | |
| .back { | |
| background-size: cover; | |
| box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.25); | |
| border-radius: 10px; | |
| background-position: center; | |
| -webkit-transition: -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| transition: -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| -webkit-transition: -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1), -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1), -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| -webkit-backface-visibility: hidden; | |
| backface-visibility: hidden; | |
| text-align: center; | |
| min-height: 280px; | |
| height: auto; | |
| border-radius: 10px; | |
| color: white; | |
| font-size: 1.5rem; | |
| } | |
| .back { | |
| background: grey; | |
| background: -webkit-linear-gradient(45deg, grey 0%, black 100%); | |
| background: linear-gradient(45deg, grey 0%, black 100%); | |
| } | |
| .front:after { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| z-index: 1; | |
| width: 100%; | |
| height: 100%; | |
| content: ''; | |
| display: block; | |
| opacity: .6; | |
| background-color: blue; | |
| -webkit-backface-visibility: hidden; | |
| backface-visibility: hidden; | |
| border-radius: 10px; | |
| } | |
| .card-container:hover .front, | |
| .card-container:hover .back { | |
| -webkit-transition: -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| transition: -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| -webkit-transition: -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1), -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1), -webkit-transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1); | |
| } | |
| .back { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| } | |
| .inner { | |
| -webkit-transform: translateY(-50%) translateZ(60px) scale(0.94); | |
| transform: translateY(-50%) translateZ(60px) scale(0.94); | |
| top: 50%; | |
| position: absolute; | |
| left: 0; | |
| width: 100%; | |
| padding: 2rem; | |
| box-sizing: border-box; | |
| outline: 1px solid transparent; | |
| -webkit-perspective: inherit; | |
| perspective: inherit; | |
| z-index: 2; | |
| } | |
| .card-container .back { | |
| -webkit-transform: rotateY(180deg); | |
| transform: rotateY(180deg); | |
| } | |
| .card-container .front { | |
| -webkit-transform: rotateY(0deg); | |
| transform: rotateY(0deg); | |
| } | |
| .card-container:hover .back { | |
| -webkit-transform: rotateY(0deg); | |
| transform: rotateY(0deg); | |
| -webkit-transform-style: preserve-3d; | |
| transform-style: preserve-3d; | |
| } | |
| .card-container:hover .front { | |
| -webkit-transform: rotateY(-180deg); | |
| transform: rotateY(-180deg); | |
| -webkit-transform-style: preserve-3d; | |
| transform-style: preserve-3d; | |
| } | |
| .front .inner p { | |
| font-size: 2rem; | |
| margin-bottom: 2rem; | |
| position: relative; | |
| } | |
| .front .inner p:after { | |
| content: ''; | |
| width: 4rem; | |
| height: 2px; | |
| position: absolute; | |
| background: orange; | |
| display: block; | |
| left: 0; | |
| right: 0; | |
| margin: 0 auto; | |
| bottom: -.75rem; | |
| } | |
| .front .inner span { | |
| color: rgba(255, 255, 255, 0.9); | |
| font-family: 'Sanchez'; | |
| } | |
| @media screen and (max-width: 64rem) { | |
| .col { | |
| width: calc(33.333333% - 2rem); | |
| } | |
| } | |
| @media screen and (max-width: 48rem) { | |
| .col { | |
| width: calc(50% - 2rem); | |
| } | |
| } | |
| @media screen and (max-width: 32rem) { | |
| .col { | |
| width: 100%; | |
| margin: 0 0 2rem 0; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "sass": { | |
| "compiler": "Ruby Sass/3.7.4", | |
| "extensions": {}, | |
| "syntax": "SCSS", | |
| "outputStyle": "expanded" | |
| }, | |
| "autoprefixer": true | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment