更新时间:2019-10-13 22:38:31
需要调用3个文件
1 2 3 | < script src = 'dist/jquery.scrollie.min_1.js' ></ script > < script src = "dist/script.js" ></ script > |
html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | < div class = "main-wrapper" > < div class = "slide slide-one" data-background = "#3498db" > < div class = "inside" > < p >向下滚动网页改变背景颜色</ p > </ div > </ div > < div class = "slide slide-two" data-background = "#27ae60" > < div class = "inside" > < p >这是第二屏,看背景颜色在改变< br /> </ div > </ div > < div class = "slide slide-three" data-background = "#e74c3c" > < div class = "inside" > < p >这是第三屏,看背景颜色在改变</ p > </ div > </ div > < div class = "slide slide-four" data-background = "#e67e22" > < div class = "inside" > < p >这是第四屏,看背景颜色在改变</ p > </ div > </ div > < div class = "slide slide-five" data-background = "#9b59b6" > < div class = "inside" > < p >这是第五屏,看背景颜色在改变</ p > </ div > </ div > < div class = "slide slide-five" data-background = "#34495e" > < div class = "inside" > < p >这是第六屏,看背景颜色在改变 </ p > </ div > </ div > </ div > |
每屏修改对应的data-background值即可。
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com