Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 74735

CSS :hover selector not working on a button

$
0
0

I'm trying to get the button to have a fading effect (change border and text color), but the hover selector is just not working. I've tried to fix this for an hour with no avail.

body {
  margin: 0;
  background-image: url("https://www.ecopetit.cat/wpic/mpic/1-16867_preview-wallpaper-new-york-usa-night-skyscrapers-new.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #999;
}

html {
  width: 100%;
  height: 100%;
}

.fadebutton {
  display: inline-block;
  width: 200px;
  padding: 8px;
  color: #fff;
  border: 2px solid;
  border-color: white;
  text-align: center;
  outline: none;
  text-decoration: none;
  transition: border-color 0.3s ease-out;
}

.fadebutton:hover,
.fadebutton:active {
  color: #66d8ed;
  border-color: #66d8ed;
  transition: border-color 0.4s ease-in;
}
<script defer src="script.js"></script><a class="fadebutton" href="www.google.com">Change color</a>

Viewing all articles
Browse latest Browse all 74735

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>