2020-03-28 21:48:09 +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 > 3D transforms - tew-0x00< / title >
< meta name = "description" content = "3D transforms - tew-0x00" >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
2020-03-31 18:56:49 +02:00
< script defer src = "/scripts/prism.js" > < / script >
2020-06-05 00:35:22 +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" >
2020-06-05 04:31:49 +02:00
< 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 21:48:09 +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 21:48:09 +01:00
< / div >
< / header >
< h3 class = "title" > 3D transforms< / h3 >
< div id = "divsection" >
2020-03-30 14:16:06 +02:00
< p > CSS 3D transforms allow us to rotate elements in (so perceived) third dimension< br > All that is really needed is a simple transform method such as < code class = "language-css" > rotate{X,Y,Z}()< / code > that takes exactly one argument - the amount of wanted rotation.< br > < / p >
2020-03-31 20:56:14 +02:00
< h3 id = "FiraCode" > a note about Fira Code< / h3 >
2020-05-22 12:02:54 +02:00
< p > The < code class = "language-html" > h1< / code > font inside the divs below is specified as < a href = "https://github.com/tonsky/FiraCode" target = "_blank" rel = "noopener noreferrer" > Fira Code Retina< / a > , so in case you didn't have it installed, the glyphs wouldn't show up nicely. < br > I added it to the site, though.< br > That way you < i > don't< / i > have to have it installed on your device.< br > To understand why < code class = "language-css" > "ss07", "zero"< / code > was used you can read < a href = "https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets" target = "_blank" rel = "noopener noreferer" > this.< / a > < / p >
2020-03-28 21:48:09 +01:00
< div id = div3dtransformrotate-x > < h1 > < ~~ rotate X ~~>< / h1 > < / div >
< p > A div rotated along its x-axis< / p >
< div class = "divcodeblock" >
< pre > < code class = "language-css" > #div3dtransformrotate-x {
text-align: center;
border-radius: 7px;
padding: 5px 0;
min-height: 100px;
margin: 0 3em;
-webkit-transform: rotateX(60deg);
-ms-transform: rotateX(60deg);
transform: rotateX(60deg);
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;
}
#div3dtransformrotate-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 21:48:09 +01:00
}< / code > < / pre >
< / div >
< div id = div3dtransformrotate-y > < h1 > < ~~ rotate Y ~~>< / h1 > < / div >
< p > A div rotated along its y-axis< / p >
< div class = "divcodeblock" >
< pre > < code class = "language-css" > #div3dtransformrotate-y {
text-align: center;
border-radius: 7px;
padding: 5px 0;
min-height: 100px;
margin: 1em 3em;
-webkit-transform: rotateY(50deg);
-ms-transform: rotateY(50deg);
transform: rotateY(50deg);
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;
}
#div3dtransformrotate-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 21:48:09 +01:00
}< / code > < / pre >
< / div >
< div id = div3dtransformrotate-z > < h1 > < ~~ rotate Z ~~>< / h1 > < / div >
< p > A div rotated along its z-axis< / p >
< div class = "divcodeblock" >
< pre > < code class = "language-css" > #div3dtransformrotate-z {
text-align: center;
border-radius: 7px;
padding: 5px 0;
min-height: 100px;
margin: 0 3em;
-webkit-transform: rotateZ(4deg);
-ms-transform: rotateZ(4deg);
transform: rotateZ(4deg);
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;
}
#div3dtransformrotate-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 21:48:09 +01:00
}< / code > < / pre >
< / div >
< / div >
< footer class = "copyright" >
© 2020 < a href = "https://git.dotya.ml/wanderer" target = "_blank" > wanderer< / a >
2020-03-30 14:16:06 +02:00
· < a href = "https://tew0x00.dotya.ml/" > tew-0x00< / a >
2020-03-28 21:48:09 +01:00
· WTFPL< br >
< a href = "https://git.dotya.ml/wanderer/TEW-0x00" target = "_blank" title = "page source" > source< / a >
< / footer >
< / body >
< / html >