Created
March 16, 2017 18:31
-
-
Save tj/82ff4a4d3bd4a4f915a8bfa5b10ef1ed to your computer and use it in GitHub Desktop.
This file contains 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
.Images.three { | |
--size: 450px; | |
--size-ratio: .75; | |
--size-small: calc(var(--size) * var(--size-ratio)); | |
--inset: 150px; | |
--bottom: 25px; | |
display: flex; | |
justify-content: center; | |
align-items: flex-end; | |
} | |
.Images.three .Image img { | |
transition: transform 600ms var(--ease); | |
} | |
.Images.three .Image:nth-child(1) img { | |
height: var(--size-small); | |
width: auto; | |
transform: translateX(var(--inset)); | |
margin-bottom: var(--bottom); | |
} | |
.Images.three .Image:nth-child(2) img { | |
height: var(--size); | |
width: auto; | |
z-index: 50; | |
} | |
.Images.three .Image:nth-child(3) img { | |
height: var(--size-small); | |
width: auto; | |
transform: translateX(calc(-1 * var(--inset))); | |
margin-bottom: var(--bottom); | |
} | |
@media screen and (min-width: 1500px) { | |
.Images.three { | |
--inset: 10px; | |
} | |
} | |
@media screen and (min-width: 1300px) { | |
.Images.three { | |
--inset: 50px; | |
} | |
} | |
@media screen and (max-width: 900px) { | |
.Images.three { | |
--inset: 250px; | |
} | |
} | |
@media screen and (max-width: 700px) { | |
.Images.three { | |
--size: 350px; | |
--inset: 200px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment