Use CSS3 transitions with gradient backgrounds

后端 未结 16 1571
慢半拍i
慢半拍i 2020-11-21 22:18

I\'m trying to transition on hover with css over a thumbnail so that on hover, the background gradient fades in. The transition isn\'t working, but if I simply change it to

16条回答
  •  清酒与你
    2020-11-21 23:24

    You can FAKE transitions between gradients, using transitions in the opacity of a few stacked gradients, as described in a few of the answers here:

    CSS3 animation with gradients.

    You can also transition the position instead, as described here:

    CSS3 gradient transition with background-position.

    Some more techniques here:

    Animating CSS3 Gradients.

提交回复
热议问题