transitions tutorial
here you can see how the transition is working
by shuja uddin
HTML
<div class="wrap">
<div class="box uni"></div>
<div class="box-2 uni"></div>
</div>
<div class="a">ease</div>
CSS
.box {
-webkit-transition-timing-function: steps(6, start);
-moz-transition-timing-function: steps(6, start);
-o-transition-timing-function: steps(6, start);
transition-timing-function: steps(6, start);
}
.box-2 {
-webkit-transition-timing-function: steps(4, end);
-moz-transition-timing-function: steps(4, end);
-o-transition-timing-function: steps(4, end);
transition-timing-function: steps(4, end);
}
.box:hover, .box-2:hover {
background-color: lightblue;
cursor: pointer;
}
.uni {
box-sizing: border-box;
float: left;
border: solid 1px black;
width: 150px;
height: 150px;
background: goldenrod;
margin-top: 20px;
margin-left: 2px;
-webkit-transition-duration: 3s;
-moz-transition-duration: 3s;
-o-transition-duration: 3s;
transition-duration: 3s;
-webkit-transition-property: background-color;
-moz-transition-property: background-color;
-o-transition-property: background-color;
transition-property: background-color;
}
.wrap {
width: 304px;
overflow: hidden;
margin: auto;
}
div.a{
border:none;box-shadow:none;width:150px;height:40px;transition:background-color 0.5s ease;background-color:#eee;
}
div.a:hover{
background-color:#ddd
}