surtur
50b6f553e6
All checks were successful
continuous-integration/drone/push Build is passing
closes #1
127 lines
6.0 KiB
HTML
127 lines
6.0 KiB
HTML
|
|
<!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">
|
|
<script defer src="/scripts/prism.js"></script>
|
|
<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">
|
|
<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">3D transforms</h3>
|
|
<div id="divsection">
|
|
<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>
|
|
<h3 id="FiraCode">a note about Fira Code</h3>
|
|
<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>
|
|
<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 {
|
|
font-family: 'Fira Code Retina';
|
|
text-rendering: optimizeLegibility;
|
|
font-feature-settings: "ss07", "zero";
|
|
}</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 {
|
|
font-family: 'Fira Code Retina';
|
|
text-rendering: optimizeLegibility;
|
|
font-feature-settings: "ss07", "zero";
|
|
}</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 {
|
|
font-family: 'Fira Code Retina';
|
|
text-rendering: optimizeLegibility;
|
|
font-feature-settings: "ss07", "zero";
|
|
}</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>
|