added 2Dtransforms page + styles
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2020-03-26 08:05:38 +01:00
parent d1280b3276
commit 5f29ea9603
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
3 changed files with 122 additions and 1 deletions

@ -17,6 +17,7 @@ p {
color: gainsboro;
text-align: center;
line-height: 1.3em;
margin: .5em 3em;
}
h1,h2,h3,h4,h5 {
@ -228,4 +229,32 @@ pre {
1px 1px 2px black,
0 4px 25px blue,
0 0 5px darkblue;
}
#divtransform1 {
border: 2px solid whitesmoke;
border-radius: 30px;
padding: 5px;
width: 150px;
min-height: 50px;
margin: 2em 10em;
align-content: center;
text-align: center;
-webkit-transform: rotate(20deg);
-ms-transform: rotate(20deg);
transform: rotate(20deg);
}
#divtransform2 {
border: 2px solid whitesmoke;
border-radius: 30px;
padding: 10px;
width: 150px;
min-height: 50px;
margin: 2em 10em;
align-content: center;
text-align: center;
-webkit-transform: skew(20deg, 10deg);
-ms-transform: skew(20deg, 10deg);
transform: skew(20deg, 20deg);
}

@ -29,7 +29,7 @@
<li><a href="./pages/roundedcorners.html">CSS3 rounded corners</a></li>
<li><a href="./pages/backgroundgradient.html">CSS3 background gradient</a></li>
<li><a href="./pages/shadows.html">CSS3 shadows</a></li>
<li><a href="#">CSS3 2D transforms</a></li>
<li><a href="./pages/2Dtransforms.html">CSS3 2D transforms</a></li>
<li><a href="#">CSS3 3D transforms</a></li>
<li><a href="#">CSS3 transitions</a></li>
<li><a href="#">CSS3 animations</a></li>

92
pages/2Dtransforms.html Normal file

@ -0,0 +1,92 @@
<!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>2D transforms - tew-0x00</title>
<meta name="description" content="2D transforms - 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">2D transform</h3>
<div id="divsection">
<p>
CSS 2D transforms allow us to rotate, move, scale and skew elements<br>
</p>
<p>
Below is the famous "ascii shrug" (it's not actually ascii only I have been calling it that for a long time now)
<code class="language-shrug">¯\_(ツ)_/¯</code> inside a div that is slightly rotated <i>clockwise</i>.
</p>
<div id=divtransform1>
<h1>¯\_(ツ)_/¯</h1>
</div>
<div class="divcodeblock">
<pre>
<code class="language-css">
#divtransform1 {
border: 2px solid whitesmoke;
border-radius: 30px;
padding: 5px;
width: 150px;
min-height: 50px;
margin: 2em 10em;
align-content: center;
text-align: center;
-webkit-transform: rotate(20deg);
-ms-transform: rotate(20deg);
transform: rotate(20deg);
}
</code>
</pre>
</div>
<p>
Skew parameter does exactly what the name says - skews whatever element you throw at it.<br>
It takes two parameters itself: x and y axis values (in degrees).
</p>
<div id=divtransform2>
<h1>¯\_(ツ)_/¯</h1>
</div>
<div class="divcodeblock">
<pre>
<code class="language-css">
#divtransform2 {
border: 2px solid whitesmoke;
border-radius: 30px;
padding: 10px;
width: 150px;
min-height: 50px;
margin: 2em 10em;
align-content: center;
text-align: center;
-webkit-transform: skew(20deg, 10deg);
-ms-transform: skew(20deg, 10deg);
transform: skew(20deg, 20deg);
}
</code>
</pre>
</div>
</div>
<footer class="copyright">
&copy; 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="../prism.js"></script>
</body>
</html>