Transition In Css On Hover Code Example


Example 1: css transition all


-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;

Example 2: css hover animation


.YOURHTMLCONTENT i {
height: auto;
float: left;
color: #fff;
font-size: 55px;
margin: 30px 30px 30px 30px;
transition: 0.8s;
transition-property: color, transform;
}

.YOURHTMLCONTENT i:hover {
color: #FF5733;
transform: scale(1.3);
}

Example 3: css transition on hover


/* Simple CSS color transition effect on selector */

div {
color: white;
background-color: black;
}

div:hover {
background-color: red;
}


/* Additional transition effects on selector */

div {
background-color: black;
color: white;
height: 100px;
transition: width 1.5s, height 3s;
width: 100px;

}

div:hover {
background-color: red;
height: 300px;
width: 150px;
}

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable