Answers for "css :hover transition duration"

CSS
7

transition css hover

/* Transition is how much my element will take time to change his state 
   or apply a specific style on it at specific */
.my-div{
  background-color: #f00; /*Red*/
  transition: 3s ease-in-out;
  /* transition: .5s ease-in-out; [0.5 seconds] */
}
.my-div:hover{
  background-color: #00f; /*Blue*/
}
/* .my-div background-color will be changed from red to blue in 3 seconds*/
Posted by: Guest on June-14-2021
0

transition on hover

div {
  transition: background-color 0.5s ease;
  background-color: red;
}
div:hover {
  background-color: green;
}
Posted by: Guest on June-13-2021

Code answers related to "css :hover transition duration"

Browse Popular Code Answers by Language