0

In this jsFiddle: https://jsfiddle.net/ptba8Lzd/

I have done everything correctly so that the properties being changed with addClass will do so smoothly (using transition: all 2.5s ease-out;).

You can see this working fine with the height property. However, when switching from one transient to another, it does so abruptly. Why? How can I switch smootly between these two?

linear-gradient(to bottom, #25211e 0%, rgba(37, 33, 30, 0) 100%);

linear-gradient(to bottom, #25211e 0%, rgba(37, 33, 30, 255) 100%);
Saturnix
  • 10,130
  • 17
  • 64
  • 120
  • as a side note, the 255 is wrong, it should be 1 – Temani Afif Feb 03 '19 at 14:59
  • 2
    in your case, since you have transparent color, you only need to do transition on background-color like this: https://jsfiddle.net/8bswkq3c/ – Temani Afif Feb 03 '19 at 15:03
  • thanks a lot! That's what I originally tried but it didn't work in production. Tried it now and it works, have no idea what was wrong before: thanks! – Saturnix Feb 03 '19 at 15:08

0 Answers0