To add a one-way transition with CSS, we use the transition
property.
For instance, we write
input {
background: white;
-webkit-transition: background 0.5s;
-moz-transition: background 0.5s;
-ms-transition: background 0.5s;
-o-transition: background 0.5s;
transition: background 0.5s;
}
to transition the background to white with background: white;
.
And we add the transition for 0.5 seconds with transition: background 0.5s;
.