2020-03-28 22:17:20 +01:00
<!DOCTYPE html>
<!-- [if lt IE 7]> <html class="no - js lt - ie9 lt - ie8 lt - ie7"> <![endif] -->
<!-- [if IE 7]> <html class="no - js lt - ie9 lt - ie8"> <![endif] -->
<!-- [if IE 8]> <html class="no - js lt - ie9"> <![endif] -->
<!-- [if gt IE 8]><! --> < html class = "no-js" > <!-- <![endif] -->
< head >
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< title > animations - tew-0x00< / title >
< meta name = "description" content = "animations - tew-0x00" >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
2020-04-01 20:08:53 +02:00
< script defer src = "/scripts/prism.js" > < / script >
2020-06-05 04:31:49 +02:00
< link rel = "preload" as = "font" type = "font/woff2" href = "/fonts/woff2/FiraCode-Light.woff2" type = "font/woff2" >
< link rel = "preload" as = "font" type = "font/woff2" href = "/fonts/woff2/FiraCode-Medium.woff2" type = "font/woff2" >
< link rel = "preload" as = "font" type = "font/woff2" href = "/fonts/woff2/FiraCode-Regular.woff2" type = "font/woff2" >
< link rel = "preload" as = "font" type = "font/woff2" href = "/fonts/woff2/FiraCode-SemiBold.woff2" type = "font/woff2" >
< link rel = "preload" as = "font" type = "font/woff2" href = "/fonts/woff2/FiraCode-Bold.woff2" type = "font/woff2" >
< link rel = "preload" as = "font" type = "font/woff2" href = "/fonts/woff2/FiraCode-VF.woff2" type = "font/woff2" >
< link rel = "preload" as = "font" type = "font/woff" href = "/fonts/woff/FiraCode-Light.woff" type = "font/woff" >
< link rel = "preload" as = "font" type = "font/woff" href = "/fonts/woff/FiraCode-Medium.woff" type = "font/woff" >
< link rel = "preload" as = "font" type = "font/woff" href = "/fonts/woff/FiraCode-Regular.woff" type = "font/woff" >
< link rel = "preload" as = "font" type = "font/woff" href = "/fonts/woff/FiraCode-SemiBold.woff" type = "font/woff" >
< link rel = "preload" as = "font" type = "font/woff" href = "/fonts/woff/FiraCode-Bold.woff" type = "font/woff" >
< link rel = "preload" as = "font" type = "font/woff" href = "/fonts/woff/FiraCode-VF.woff" type = "font/woff" >
2020-03-31 18:56:49 +02:00
< link rel = "stylesheet" type = "text/css" href = "/css/style.css" >
< link rel = "stylesheet" type = "text/css" href = "/css/prism.css" data-noprefix / >
2020-03-28 22:17:20 +01:00
< / head >
< body >
< header >
< div id = "divlogoimg" >
2020-03-31 18:56:49 +02:00
< img class = "logoimg" src = "/media/logo.png" >
2020-03-28 22:17:20 +01:00
< / div >
< / header >
< h3 class = "title" > animations< / h3 >
< div id = "divsection" >
< div id = divanimate-shrug >
< h1 > ¯\_(ツ)_/¯< / h1 >
< / div >
< p > CSS animations allow us to animate the transformations of elements< br > Here's the rotating shrug code.< br > The < code class = "language-css" > @keyframes< / code > rules specify how long the animation should take and what course the animation should take, such as "be rotated at 180deg 50% along the animation" in case of animated asciishrug.< br > By using the < code class = "language-css" > infinite< / code > parameter to the animation we ensure it is looping forever and ever (because why not).< br > The < i > direction< / i > of a single animation can be one of < code class = "language-css" > normal, reverse, alternate or alternate-reverse< / code > .< / p >
< div class = "divcodeblock" >
< pre > < code class = "language-css" > #divanimate-shrug {
text-align: center;
border-radius: 7px;
padding: 5px 0;
min-height: 100px;
margin: 1em 3em;
animation: rotate-shrug 4s infinite;
-webkit-animation: rotate-shrug 4s infinite;
animation-direction: alternate;
background: transparent;
opacity: 0.95;
}
#divanimate-shrug h1 {
2020-05-22 12:02:54 +02:00
font-family: 'Fira Code Retina';
text-rendering: optimizeLegibility;
font-feature-settings: "ss07", "zero";
2020-03-28 22:17:20 +01:00
}
@keyframes rotate-shrug {
0% {
transform: rotateY(0deg);
}
50% {
transform: rotateY(180deg);
}
100% {
transform: rotateY(360deg);
}
}< / code > < / pre >
< / div >
< p > Here's a div infinitely rotating along its x-axis.< / p >
< div id = divanimate-x > < h1 > < ~~ animate X ~~>< / h1 > < / div >
< div class = "divcodeblock" >
< pre > < code class = "language-css" > #divanimate-x {
text-align: center;
border-radius: 7px;
padding: 5px 0;
min-height: 100px;
margin: 0 3em;
animation: rotate-x 4s infinite;
-webkit-animation: rotate-x 4s infinite;
-webkit-transform: rotateX(60deg);
transform: rotateX(60deg);
animation-direction: alternate;
background: rgb(2,0,36);
background: radial-gradient(
circle,
rgba(2,0,36,1) 0%,
rgba(9,9,121,1) 52%,
rgba(0,212,255,1) 100%
);
opacity: 0.95;
}
#divanimate-x h1 {
2020-05-22 12:02:54 +02:00
font-family: 'Fira Code Retina';
text-rendering: optimizeLegibility;
font-feature-settings: "ss07", "zero";
2020-03-28 22:17:20 +01:00
}
@keyframes rotate-x {
0% {
transform: rotateX(-60deg);
}
100% {
transform: rotateX(60deg);
}
}< / code > < / pre >
< / div >
< p > Here's a div infinitely rotating along its y-axis.< / p >
< div id = divanimate-y > < h1 > < ~~ animate Y ~~>< / h1 > < / div >
< div class = "divcodeblock" >
< pre > < code class = "language-css" > #divanimate-y {
text-align: center;
border-radius: 7px;
padding: 5px 0;
min-height: 100px;
margin: 1em 3em;
animation: rotate-y 4s infinite;
-webkit-animation: rotate-y 4s infinite;
animation-direction: alternate;
background: rgb(2,0,36);
background: radial-gradient(
circle,
rgba(2,0,36,1) 0%,
rgba(9,9,121,1) 42%,
rgba(0,212,255,1) 100%
);
opacity: 0.95;
}
#divanimate-y h1 {
2020-05-22 12:02:54 +02:00
font-family: 'Fira Code Retina';
text-rendering: optimizeLegibility;
font-feature-settings: "ss07", "zero";
2020-03-28 22:17:20 +01:00
}
@keyframes rotate-y {
0% {
transform: rotateY(-50deg);
}
100% {
transform: rotateY(50deg);
}
}< / code > < / pre >
< / div >
< p > Here's a div infinitely rotating along its z-axis.< / p >
< div id = divanimate-z > < h1 > < ~~ animate Z ~~>< / h1 > < / div >
< div class = "divcodeblock" >
< pre > < code class = "language-css" > #divanimate-z {
text-align: center;
border-radius: 7px;
padding: 5px 0;
min-height: 100px;
margin: 0 3em;
animation: rotate-z 3s infinite;
-webkit-animation: rotate-z 3s infinite;
animation-direction: alternate;
background: rgb(2,0,36);
background: radial-gradient(
circle,
rgba(2,0,36,1) 0%,
rgba(9,9,121,1) 52%,
rgba(0,212,255,1) 100%
);
opacity: 0.95;
}
#divanimate-z h1 {
2020-05-22 12:02:54 +02:00
font-family: 'Fira Code Retina';
text-rendering: optimizeLegibility;
font-feature-settings: "ss07", "zero";
2020-03-28 22:17:20 +01:00
}
@keyframes rotate-z {
0% {
transform: rotateZ(-20deg);
}
50% {
transform: rotateZ(0deg);
}
100% {
transform: rotateZ(20deg);
}
}< / code > < / pre >
< / div >
< / div >
< footer class = "copyright" >
© 2020 < a href = "https://git.dotya.ml/wanderer" target = "_blank" > wanderer< / a >
· < a href = "https://tew0x00.dotya.ml/" > tew-0x00< / a >
· WTFPL< br >
< a href = "https://git.dotya.ml/wanderer/TEW-0x00" target = "_blank" title = "page source" > source< / a >
< / footer >
< / body >
< / html >