Skip to content

Instantly share code, notes, and snippets.

@tj tj/images.css
Created Mar 16, 2017

Embed
What would you like to do?
.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
You can’t perform that action at this time.