Can I apply a CSS transition to the overflow property?

后端 未结 5 1889
礼貌的吻别
礼貌的吻别 2020-11-28 14:04

I\'m trying to set a transition-delay to the overflow property of body when a div is clicked by adding a class to the

5条回答
  •  眼角桃花
    2020-11-28 14:41

    There are many properties that can't be transitioned. overflow is among them; the render engine has no idea how to transition between "hidden" and "shown", because those are binary options, not intervals. This is the same reason why you can't transition between display: none; and display: block; (for example): there are no in-between phases to use as transitions.

    You can see a list of properties you can animate here on Mozilla Developer Network.

提交回复
热议问题