added animations.html + styles
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d7b60139d3
commit
055f0f80e6
122
css/style.css
122
css/style.css
@ -349,3 +349,125 @@ pre {
|
||||
font-family: 'Fira Code Retina'
|
||||
}
|
||||
|
||||
#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 {
|
||||
font-family: 'Fira Code Retina'
|
||||
}
|
||||
@keyframes rotate-shrug {
|
||||
0% {
|
||||
transform: rotateY(0deg);
|
||||
}
|
||||
50% {
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotateY(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#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 {
|
||||
font-family: 'Fira Code Retina'
|
||||
}
|
||||
@keyframes rotate-x {
|
||||
0% {
|
||||
transform: rotateX(-60deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotateX(60deg);
|
||||
}
|
||||
}
|
||||
|
||||
#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 {
|
||||
font-family: 'Fira Code Retina'
|
||||
}
|
||||
@keyframes rotate-y {
|
||||
0% {
|
||||
transform: rotateY(-50deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotateY(50deg);
|
||||
}
|
||||
}
|
||||
|
||||
#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 {
|
||||
font-family: 'Fira Code Retina'
|
||||
}
|
||||
@keyframes rotate-z {
|
||||
0% {
|
||||
transform: rotateZ(-20deg);
|
||||
}
|
||||
50% {
|
||||
transform: rotateZ(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotateZ(20deg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
<li><a href="./pages/2Dtransforms.html">CSS3 2D transforms</a></li>
|
||||
<li><a href="./pages/3Dtransforms.html">CSS3 3D transforms</a></li>
|
||||
<li><a href="#">CSS3 transitions</a></li>
|
||||
<li><a href="#">CSS3 animations</a></li>
|
||||
<li><a href="./pages/animations.html">CSS3 animations</a></li>
|
||||
<li><a href="#">CSS3 multiple columns</a></li>
|
||||
<li><a href="#">CSS3 box sizing</a></li>
|
||||
<li><a href="#">CSS3 flexbox</a></li>
|
||||
|
170
pages/animations.html
Normal file
170
pages/animations.html
Normal file
@ -0,0 +1,170 @@
|
||||
<!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">
|
||||
<link rel="stylesheet" type="text/css" href="../css/style.css">
|
||||
<link rel="stylesheet" type="text/css" href="../css/prism.css" data-noprefix/>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div id="divlogoimg">
|
||||
<img class="logoimg" src="../media/logo.png">
|
||||
</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 {
|
||||
font-family: 'Fira Code Retina'
|
||||
}
|
||||
@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 {
|
||||
font-family: 'Fira Code Retina'
|
||||
}
|
||||
@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 {
|
||||
font-family: 'Fira Code Retina'
|
||||
}
|
||||
@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 {
|
||||
font-family: 'Fira Code Retina'
|
||||
}
|
||||
@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>
|
||||
<script src="../scripts/prism.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user