在Fullpage.js中滚动时平滑更改正文的背景颜色 [英] Smooth changing background-color of body while scrolling in Fullpage.js

查看:523
本文介绍了在Fullpage.js中滚动时平滑更改正文的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用fullpage.js,我想在滚动时平滑地更改背景颜色。我在这里看到这个效果。这个网站也使用Fullpage.js,我想添加这个效果到我的网站。
我在此创建 jsFiddle和fullpage示例
使用平滑颜色的网站使用 mt-data-slide-bg-color =#f4efec和一些javascript代码到全页功能。此函数位于此处(注释中的链接)。所以,如果我添加这个代码到我的例子,它不工作。

I use fullpage.js and I want to change background-color smoothly of body while scrolling. I saw this effect here. This site also use Fullpage.js and I want to add this effect to my site. I create a jsFiddle with fullpage example here. Site with smooth color uses mt-data-slide-bg-color="#f4efec" and some javascript code to fullpage function. This function locates here (link in comments). So but if I add this code to my example it doesn't work.

请帮助我。

推荐答案

您可以使用 jquery UI 来动画颜色。

You can animate colours using jquery UI.

然后,更改正文颜色,并留下没有任何背景颜色或图像的部分和幻灯片。

Then, change the body color and leave sections and slides without any background color or image.

这篇关于在Fullpage.js中滚动时平滑更改正文的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆