Jump to content

Transition color font with background in same time


Sigmahokies

Recommended Posts

Hi everyone,

 

I am struggling with transition font color with background in table.

 

I am using TD create transition background, it works, but not font.

 

Here my CSS i created:

 

 

td {
background-color: rgba(0, 79, 0, 0.75);
border-color:white;
border-collapse:collapse;
}
#td {
transition:background-color 0.7s ease;
background-color:rgba(0, 79, 0, 0.75);
}
#td:hover {
background-color:white; 
color:rgba(0, 79, 0, 0.75);
}
Link to comment
Share on other sites

You only made a transition for the background color, not for the font color. Add both.

transition:background-color 0.7s ease, color 0.7s ease;
Link to comment
Share on other sites

You have a comma between 0 and 7, it should be a point.

You can only have one transition rule on an element, if you write two rules for the same element only the last one will be applied.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...