If i have applied a transition property to an element, i have to declare the properties in style tag, but how can i incorporate the whole declaration within the style attribute of the element?
div {
background-color: teal;
padding: 20px 20px 20px 20px;
transition: all 1s;
}
div:hover {
background-color: green;
}
<div></div>
In the above example, is it possible to simplify the code by including the transition property in style attribute of div element?