javascript - jquery水流过管道效果

标签 javascript jquery css html jquery-plugins

<分区>

我正在尝试为本地管道公司创建一个单页可滚动网站。我有一个想法需要像 :

这样的效果

http://sidigital.co/

任何人都可以为这个“水流过管道”的概念推荐任何 JS/Jquery 插件吗?

最佳答案

嗯,这主要是使用 CSS3 而不是 JavaScript 效果来实现的。您可以编写一个脚本,将触发特定 CSS 事件与滚动功能结合起来,例如 parallax effect以及在 this fiddle 上看到的效果.

CSS 代码因为我不能post the link as is :

CSS

#progressbar {
    background-color: black;
    border-radius: 8px;
    padding: 3px;
    width: 400px;
}

#progressbar div {
    background-color: #0063C6;
    width: 50%;
    height: 10px;
    border-radius: 5px;
    animation:loadbar 2s;
    -webkit-animation:loadbar 2s;
}

@keyframes loadbar {
    0% {
        width: 0%;
    }
    100% {
        width: 50%;
    }

}

@-webkit-keyframes loadbar {
    0% {
        width: 0%;
    }
    100% {
        width: 50%;
    }
}

HTML

<div id="progressbar">
<div></div>

关于javascript - jquery水流过管道效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21363237/

相关文章:

javascript - 如何将 zingchart 与 ng-repeat 结合使用,以便我可以在不同的图表上显示不同的数据。有什么办法吗

jQuery 背景 Canvas 透明度

css - 初学者 CSS 问题

css - Firefox 中奇怪的 css 问题,在检查元素时消失

javascript - 如何在选择框中设置只读 false 以及当选择复选框时,它将是可编辑的。在我的 jquery 代码中禁用不起作用

javascript - d3 .csv,数据量很大,只画了一个月

javascript - ag-Grid 服务器端分页事件

jquery - 奇怪的scrollTop()错误(在某些浏览器中)

java - Spring MVC 上的 AJAX POST 请求返回 404

jquery - 我的左侧菜单不起作用