<style>
div {
width: 100px;
height: 100px;
background: red;
transition: width 2s;
}
div:hover {
width: 300px;
}
</style>
Sources:
https://www.w3schools.com/cssref/css3_pr_transition.asp
https://stackoverflow.com/questions/55158038/how-to-animate-alignment-from-top-to-bottom-on-hover
http://sapphion.com/2011/10/25/css3-gradient-transition-with-background-position/
https://codepen.io/nrowe/pen/eafxK
Article ID: 7
Created On: Wed, Sep 2, 2020 at 9:06 PM
Last Updated On: Wed, Sep 2, 2020 at 9:06 PM
Authored by: Saeed Nobakht [[email protected]]
Online URL: https://www.navel.ir/article/css-transition-property-7.html