Sigmahokies Posted April 11, 2016 Share Posted April 11, 2016 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 More sharing options...
Ingolme Posted April 11, 2016 Share Posted April 11, 2016 What code did you use for adding a transition to the font color? Link to comment Share on other sites More sharing options...
Sigmahokies Posted April 12, 2016 Author Share Posted April 12, 2016 Look at my code above... I am using transition to do font color. Link to comment Share on other sites More sharing options...
Ingolme Posted April 12, 2016 Share Posted April 12, 2016 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 More sharing options...
Sigmahokies Posted April 13, 2016 Author Share Posted April 13, 2016 Oh i just tried that, it doesn't work. Seem transition will work one time on page. Even I tried to have code: transition:color 0,7s ease; that is separate from background, but still not work, even transition does not work with background. Link to comment Share on other sites More sharing options...
Ingolme Posted April 13, 2016 Share Posted April 13, 2016 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 More sharing options...
Sigmahokies Posted April 13, 2016 Author Share Posted April 13, 2016 Oh, I made mistake in this trend, but I did put period (.) in sec - 0.7s still not working. Link to comment Share on other sites More sharing options...
Sigmahokies Posted April 13, 2016 Author Share Posted April 13, 2016 I found the solution, I solved it...I just found the default set must not set as color, or it won't work. so, I put color font in tag letter, id, or class...not * in beginning of CSS document. Thank you for your time, Ingolme Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now