A transition property is a CSS3 shorthand property used to represent transition for a duration. The Transition Property allows CSS properties to change their values over a specific duration.
CSS3 Selectors are used to select the HTML elements for styling.
Transition Shorthand Property Contains following Properties
<style>
/*example*/
.tdb-div {
transition: background-color 0.3s ease;
background-color: pink;
}
.tdb-div:hover {
background-color: red;
}
</style>
<head>
<style>
/*example*/
.tdb-div {
transition: background-color 0.7s ease;
background-color:black;
color:white;
cursor:pointer;
padding:30px;
}
.tdb-div:hover {
background-color: gray;
color:red;
}
</style>
</head>
<body>
<div class="tdb-div">
Transition
</div>
</body>