Skip to content

Instantly share code, notes, and snippets.

@bozzin
Created December 4, 2019 09:44
Show Gist options
  • Save bozzin/ac9bd67c47200480e2a759fe9187ee61 to your computer and use it in GitHub Desktop.
Save bozzin/ac9bd67c47200480e2a759fe9187ee61 to your computer and use it in GitHub Desktop.
A Pen with a Twist - Pure CSS
// Yech! Bad PUG!!! :(
#wrapper
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
.sub
// Na-na-na-na-nope!
#wrapper, .sub {
background: hsla(200, 50%, 10%, 0.05);
overflow: hidden;
box-shadow: 0px 0px 20px 2px hsla(200, 50%, 10%, 0.1) inset;
border: 1px solid hsla(200, 50%, 10%, 0.1);
}
#wrapper {
width: 500px;
height: 500px;
margin: calc(50vh - 250px) calc(50vw - 250px);
}
.sub {
position: relative;
width: 90%;
height: 90%;
transform-origin: 50% 50%;
transform: rotate(12deg);
animation: 100s rot linear infinite;
}
@keyframes rot {
0% { transform: rotate(12deg);}
100% { transform: rotate(372deg);}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment