Kamala
44
Q:

css hover

/* Changes an element's color on hover */

.selector {
	background-color: black;
}

.selector:hover {
	background-color: blue;
}
10
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.btn {
  background-color: #f4511e;
  border: none;
  color: white;
  padding: 16px 32px;
  text-align: center;
  font-size: 16px;
  margin: 4px 2px;
  opacity: 0.6;
  transition: 0.3s;
}

.btn:hover {opacity: 1}
</style>
</head>
<body>

<h2>Fading Buttons - "Fade in Effect"</h2>

<button class="btn">Hover Over Me</button>

</body>
</html>
0
.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);
}
0
.a:hover{background-color: black;}
14

  
    a.ex1:hover, a.ex1:active {
  color: red;
}


 a.ex2:hover, a.ex2:active {
  font-size: 150%;
}


 
1
a:hover {
  background-color: yellow;
}
2

  
a:hover{ 
	background-color: yellow;
}
  
 
0

  
    /* unvisited link */
a:link {
  color: green;
}

 
/* visited link */

 a:visited {
  color: green;
}

/* mouse over link */

 a:hover {
  color: red;
}

/* selected link */

 a:active {
  color: yellow;
}
  
 
3

  
    a:hover
 { 

   background-color: yellow;

 }
  
 
0

New to Communities?

Join the community