transition types css code example
Example 1: css transition
<style>
div {
background-color: blue;
padding: 40px;
color: white;
cursor: pointer;
-webkit-transition: all 0.5s 0s ease;
-moz-transition: all 0.5s 0s ease;
-o-transition: all 0.5s 0s ease;
transition: all 0.5s 0s ease;
}
.hidden {
visibility: visible;
opacity: 0.1;
max-width: 12%;
}
.hidden:hover {
visibility: visible;
opacity: 1;
max-width: 100%;
}
</style>
<div class="hidden">HOVER ME!</div>
Example 2: css transform transition
.selector {
transition: transform 1s;
}
Example 3: html transition
html.color-theme-in-transition,
html.color-theme-in-transition *,
html.color-theme-in-transition *:before,
html.color-theme-in-transition *:after {
transition: all 750ms !important;
transition-delay: 0 !important;
}
Example 4: css transition
transition: property duration timing-function delay|initial|inherit;
Example 5: css opacity transition
div {
transition: opacity seconds;
}