69 lines
2.8 KiB
HTML
69 lines
2.8 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>transitions - tew-0x00</title>
|
|
<meta name="description" content="transitions - 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">transitions</h3>
|
|
<div id="divsection">
|
|
<p>CSS transitions give us the abilty to describe a change that is supposed to happen gradually over a given course of time<br></p>
|
|
<div id=divtransitioncolorandopacity></div>
|
|
<p>background color transition on hover/tap</p>
|
|
<div class="divcodeblock">
|
|
<pre><code class="language-css">#divtransitioncolorandopacity {
|
|
border-radius: 7px;
|
|
min-height: 100px;
|
|
margin: 0 3em;
|
|
background-color: lightskyblue;
|
|
-webkit-transition: background-color 1s ease-in, opacity 1s ease-out;
|
|
-moz-transition: background-color 1s ease-in, opacity 1s ease-out;
|
|
transition: background-color 1s ease-in, opacity 1s ease-out;
|
|
opacity: .7;
|
|
}
|
|
#divtransitioncolorandopacity:hover {
|
|
background: purple;
|
|
opacity: .95;
|
|
}</code></pre>
|
|
</div>
|
|
<div id=divtransitionshape></div>
|
|
<p>A div that shrinks width-wise on hover/tap</p>
|
|
<div class="divcodeblock">
|
|
<pre><code class="language-css">#divtransitionshape {
|
|
border-radius: 7px;
|
|
min-height: 100px;
|
|
margin: 0 3em;
|
|
background-color: lightgreen;
|
|
-webkit-transition: -webkit-transform 1s ease-in-out, margin 500ms ease-in-out;
|
|
-moz-transition: transform 1s ease-in-out, margin 500ms ease-in-out;
|
|
transition: transform 1s ease-in-out, margin 500ms ease-in-out;
|
|
transition-property: transform, margin;
|
|
}
|
|
#divtransitionshape:hover {
|
|
margin: 0 6em;
|
|
}</code></pre>
|
|
</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>
|