Smooth css change transitions

后端 未结 1 619
刺人心
刺人心 2021-01-14 05:52

I\'ve setup a jQuery function that changes the body background colour when a certain div comes into view, e.g. the body background colour is black, when #block-three

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-14 06:20

    You could use transition with CSS:

    body {
        background-color: black;
        transition:all 1s;
    }
    

    The Demo Fiddle

    0 讨论(0)
提交回复
热议问题