Skip to content

Instantly share code, notes, and snippets.

@boriscy
Last active April 11, 2021 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boriscy/15b93f496e459ca03e3b05163460079e to your computer and use it in GitHub Desktop.
Save boriscy/15b93f496e459ca03e3b05163460079e to your computer and use it in GitHub Desktop.
CSS tips
/*Rotation*/
.box {
animation: rotate 1s ease infinite;
}
@keyframes rotate {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.center {
display: flex;
justify-content: center;
align-items: center;
}
.grid {
display: grid;
grid-template-columns: 1fr 200px 1fr;
grid-template-rows: 100px 200px;
}
/**/
/*Even align of items*/
.container {
justify-content: space-evenly;
justify-items: center;
align-content: space-evenly;
align-items: center;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment