added 3D transforms + styles
This commit is contained in:
parent
e3ef8cfb2a
commit
58175c8633
@ -285,3 +285,67 @@ pre {
|
||||
-ms-transform: skew(20deg, 10deg);
|
||||
transform: skew(20deg, 20deg);
|
||||
}
|
||||
|
||||
#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'
|
||||
}
|
||||
|
||||
#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'
|
||||
}
|
||||
|
||||
#div3dtransformrotate-z {
|
||||
text-align: center;
|
||||
border-radius: 7px;
|
||||
padding: 5px 0;
|
||||
min-height: 100px;
|
||||
margin: 0 3em 2em;
|
||||
-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'
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
<li><a href="./pages/backgroundgradient.html">CSS3 background gradient</a></li>
|
||||
<li><a href="./pages/shadows.html">CSS3 shadows</a></li>
|
||||
<li><a href="./pages/2Dtransforms.html">CSS3 2D transforms</a></li>
|
||||
<li><a href="#">CSS3 3D 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="#">CSS3 multiple columns</a></li>
|
||||
@ -48,4 +48,4 @@
|
||||
|
||||
<!-- <script src="" async defer></script> -->
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
110
pages/3Dtransforms.html
Normal file
110
pages/3Dtransforms.html
Normal file
@ -0,0 +1,110 @@
|
||||
|
||||
<!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="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>The h1 font (the text inside the div is a <code class="language-html">h1</code>) is specified as <a href="https://github.com/tonsky/FiraCode" target="_blank" rel="noopener noreferrer">Fira Code Retina</a>, so in case you don't have it installed, the glyphs won't show up nicely. I recommend you check it out.<br>I am planning on adding it to the site, though.<br>That way you don't have to have it installed on your device.
|
||||
</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'
|
||||
}</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'
|
||||
}</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'
|
||||
}</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>
|
Loading…
Reference in New Issue
Block a user