CSS3 Transition Shorthand Property

The transition shorthand property allows us to specify transition-property, transition-duration, transition-timing function and transition-delay as values to transition property in one line.

Following is the code for transition shorthand property in CSS −


 Live Demo

<!DOCTYPE html>
.container div {
   width: 300px;
   height: 100px;
   border-radius: 1px;
   background-color: rgb(25, 0, 255);
   border: 2px solid red;
   transition: border-radius 2s ease 1s, background-color 2s ease-out 1s ;
.container:hover div {
   background-color: purple;
   border-radius: 50%;
<h1>Transition shorthand property</h1>
<div class="container">
<h2>Hover over the above div to change its color and its shape to oval</h2>


The above code will produce the following output −