How to make background's color transition on a react component?

Viewed 8587

I simply want to set up a background fadeout animation when a new message is posted in the page.

I just want the background to change. from blue to opacity 0.

Just a basic animation when a new post is added in the page in real time.

I've tried this but it doesn't work, when i add the message, the background color remains blue.

I am using reactJS coupled with SASS/Compass

<div className="successfully-saved"><Message /></div>
.successfully-saved{
  background-color:blue;
  @include transition(opacity, 1s ease-out);
}

Thanks for helping

1 Answers
Related