Alex
Alex

Reputation: 68046

CSS 3 fade animation on hover - issue in Opera

So I have these rules:

a{
  background-color: transparent;
  -webkit-transition: background-color .3s ease-in-out;
  -moz-transition: background-color .3s ease-in-out;
  -o-transition: background-color .3s ease-in-out;
  -ms-transition: background-color .3s ease-in-out;
  transition: background-color .3s ease-in-out;
}

a:hover{
 background-color: #fff;
}

which are supposed to make the browser fade in/out a white background on mouse over.

It works in Chrome and Firefox, but in Opera it fades from a grey color to white, instead of transparent to white...

How can I fix that?

Thank you

Upvotes: 2

Views: 1135

Answers (1)

Steve Perks
Steve Perks

Reputation: 5530

I don't know the answer to your explicit question, but maybe if you transition from rbga rather than from transparency?

a{
  background-color: rgba(255,255,255,1);
}
a:hover{
  background-color: rgba(255,255,255,0);
}

Upvotes: 3

Related Questions