I am trying to get this h3 to fade on hover. Can someone help me out?
HTML
<h3 class="clicker">test</h3>
CSS
.clicker {
-moz-transition:color .2s ease-in;
-o-transition:color .2s ease-in;
-webkit-transition:color .2s ease-in;
background:#f5f5f5;padding:20px;
}
.clicker:hover{
background:#eee;
}
What do you want to fade? The
backgroundorcolorattribute?Currently you’re changing the background color, but telling it to transition the color property. You can use
allto transition all properties.Otherwise just use
transition: background .2s ease-in.