The transition-duration
property defines
the duration of a specified transition.
.example { transition-duration: 3s; }
transition-duration: time;
transition-duration |
Yes | 10.0 | Yes | Yes | Yes |
<!DOCTYPE html>
<html>
<style>
.box {<!-- w w w .j a v a2 s . c om-->
width: 150px;
height: 150px;
background: goldenrod;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
-webkit-transition-duration: 1s;
-moz-transition-duration: 1s;
-o-transition-duration: 1s;
transition-duration: 1s;
}
.box:hover {
background-color: lightblue;
cursor: pointer;
}
.uni {
-webkit-transition-property: background-color;
-moz-transition-property: background-color;
-o-transition-property: background-color;
transition-property: background-color;
}
</style>
</head>
<body>
<div class="box uni"></div>
</body>
</html>