更多>
最新下载
24小时阅读排行榜
- 1 PHP如何获取当前日期和时间_PHP的date函数格式化日期时间详解
- 2 在Java中如何使用异常来控制程序流程
- 3 使用VSCode进行Vue.js开发
- 4 mysql如何查看索引的使用情况
- 5 Java继承与接口实现:常见错误解析与最佳实践
- 6 Java中ArithmeticException的常见触发原因
- 7 京东快递物流信息查询 京东包裹运输进度实时更新
- 8 CSS盒模型中的padding百分比相对于谁计算_CSS规范说明
- 9 pythonfor循环怎么对文件中的数字求和_pythonfor循环读取文件数字内容并求和的方法
- 10 即梦忘记密码了怎么办_即梦密码找回操作指南
- 11 电脑玩游戏时突然自动关机或重启
- 12 怎么跳过Win11联网登录 Win11安装时绕过微软账户的方法
- 13 手机CPU跑分软件哪个好_常用手机CPU跑分软件推荐与使用
- 14 Windows系统加密方法_BitLocker使用指南
- 15 windows10如何调整图标之间的水平和垂直间距_windows10桌面图标间距调整方法
更多>
最新教程
-
- Node.js 教程
- 7561 2025-08-28
-
- CSS3 教程
- 1060342 2025-08-27
-
- Rust 教程
- 11989 2025-08-27
-
- Vue 教程
- 14195 2025-08-22
-
- PostgreSQL 教程
- 10945 2025-08-21
-
- Git 教程
- 5187 2025-08-21
jQuery的弹性滑动动画进度条特效
<!doctype html>
<html lang="zh" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<title>TweenMax.js+jQuery弹性滑动动画进度条特效</title>
<link rel="stylesheet" type="text/css" href="css/default.css" />
</head>
<body><script src="/demos/googlegg.js"></script>
<div class="container">
<div class="content">
<div class="row">
<div class="box box--centered">
<div role="button" tabindex="0" aria-label="Download" class="Download" data-progressbar-label="Downloading item..."></div> <br>
</div>
<div class="box">
<pre><code>
element.ElasticProgress({
buttonSize: 60,
fontFamily: "Montserrat",
colorBg: "#adeca8",
colorFg: "#7cc576",
onClick: function(event) {
console.log("onClick");
$(this).ElasticProgress("open");
},
onOpen: function(event) {
fakeLoading($(this));
},
onFail: function(event) {
$(this).ElasticProgress("open");
},
onCancel: function(event) {
$(this).ElasticProgress("open");
}
});
</code></pre>
</div>
</div>
<div class="row">
<div class="box box--centered">
<div role="button" tabindex="0" aria-label="Download" class="Download" data-progressbar-label="Downloading item..."></div> <br>
</div>
<div class="box">
<pre><code>
element.ElasticProgress({
align: "center",
fontFamily: "Roboto",
colorFg: "#77c2ff",
colorBg: "#4e80dd",
bleedTop: 110,
bleedBottom: 40,
buttonSize: 100,
labelTilt: 70,
arrowDirection: "up",
onClick: function() {
$(this).ElasticProgress("open");
},
onOpen: function() {
fakeLoading($(this))
},
onCancel: function() {
$(this).ElasticProgress("close");
},
onComplete: function() {
var $obj = $(this)
$obj.ElasticProgress("close");
}
});
</code></pre>
</div>
</div>
<div class="row">
<div class="box box--centered">
<div role="button" tabindex="0" aria-label="Download" class="Download" data-progressbar-label="Downloading item..."></div> <br>
</div>
<div class="box">
<pre><code>
element.ElasticProgress({
align: "center",
colorFg: "#686e85",
colorBg: "#b4bad2",
highlightColor: "#ffab91",
width: Math.min($(window).width()/2 - 100, 600),
barHeight: 10,
labelHeight: 50,
labelWobbliness: 0,
bleedTop: 120,
bleedRight: 100,
buttonSize: 60,
fontFamily: "Arvo",
barStretch: 0,
barInset: 4,
barElasticOvershoot: 1,
barElasticPeriod: 0.6,
textFail: "Download Failed",
textComplete: "Download Complete",
arrowHangOnFail: false,
onClick: function() {
$(this).ElasticProgress("open");
},
onOpen: function() {
fakeLoading($(this))
},
onComplete: function() {
var $obj = $(this)
TweenMax.delayedCall(1.5, function() {
$obj.ElasticProgress("close");
})
}
});
</code></pre>
</div>
</div>
<div class="row">
<div class="box box--centered">
<div role="button" tabindex="0" aria-label="Download" class="Download" data-progressbar-label="Downloading item..."></div>
</div>
<div class="box">
<pre><code>
var e = new ElasticProgress(document.querySelectorAll('.Download')[3], {
colorFg: "#ed7499",
colorBg: "#635c73",
highlightColor: "#ed7499",
barHeight: 14,
barInset: 10,
fontFamily: "Indie Flower"
});
e.onClick(function() {
e.open();
})
e.onOpen(function() {
fakeLoading(e, 2, 0.5);
});
e.onFail(function() {
e.close();
})
</code></pre>
</div>
</div>
</div><!-- /container -->
<script src="js/jquery.min.js"></script>
<script src="js/TweenMax.min.js"></script>
<script src="js/elastic-progress.js"></script>
<script src="js/main.js"></script>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>
</body>
<html lang="zh" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<title>TweenMax.js+jQuery弹性滑动动画进度条特效</title>
<link rel="stylesheet" type="text/css" href="css/default.css" />
</head>
<body><script src="/demos/googlegg.js"></script>
<div class="container">
<div class="content">
<div class="row">
<div class="box box--centered">
<div role="button" tabindex="0" aria-label="Download" class="Download" data-progressbar-label="Downloading item..."></div> <br>
</div>
<div class="box">
<pre><code>
element.ElasticProgress({
buttonSize: 60,
fontFamily: "Montserrat",
colorBg: "#adeca8",
colorFg: "#7cc576",
onClick: function(event) {
console.log("onClick");
$(this).ElasticProgress("open");
},
onOpen: function(event) {
fakeLoading($(this));
},
onFail: function(event) {
$(this).ElasticProgress("open");
},
onCancel: function(event) {
$(this).ElasticProgress("open");
}
});
</code></pre>
</div>
</div>
<div class="row">
<div class="box box--centered">
<div role="button" tabindex="0" aria-label="Download" class="Download" data-progressbar-label="Downloading item..."></div> <br>
</div>
<div class="box">
<pre><code>
element.ElasticProgress({
align: "center",
fontFamily: "Roboto",
colorFg: "#77c2ff",
colorBg: "#4e80dd",
bleedTop: 110,
bleedBottom: 40,
buttonSize: 100,
labelTilt: 70,
arrowDirection: "up",
onClick: function() {
$(this).ElasticProgress("open");
},
onOpen: function() {
fakeLoading($(this))
},
onCancel: function() {
$(this).ElasticProgress("close");
},
onComplete: function() {
var $obj = $(this)
$obj.ElasticProgress("close");
}
});
</code></pre>
</div>
</div>
<div class="row">
<div class="box box--centered">
<div role="button" tabindex="0" aria-label="Download" class="Download" data-progressbar-label="Downloading item..."></div> <br>
</div>
<div class="box">
<pre><code>
element.ElasticProgress({
align: "center",
colorFg: "#686e85",
colorBg: "#b4bad2",
highlightColor: "#ffab91",
width: Math.min($(window).width()/2 - 100, 600),
barHeight: 10,
labelHeight: 50,
labelWobbliness: 0,
bleedTop: 120,
bleedRight: 100,
buttonSize: 60,
fontFamily: "Arvo",
barStretch: 0,
barInset: 4,
barElasticOvershoot: 1,
barElasticPeriod: 0.6,
textFail: "Download Failed",
textComplete: "Download Complete",
arrowHangOnFail: false,
onClick: function() {
$(this).ElasticProgress("open");
},
onOpen: function() {
fakeLoading($(this))
},
onComplete: function() {
var $obj = $(this)
TweenMax.delayedCall(1.5, function() {
$obj.ElasticProgress("close");
})
}
});
</code></pre>
</div>
</div>
<div class="row">
<div class="box box--centered">
<div role="button" tabindex="0" aria-label="Download" class="Download" data-progressbar-label="Downloading item..."></div>
</div>
<div class="box">
<pre><code>
var e = new ElasticProgress(document.querySelectorAll('.Download')[3], {
colorFg: "#ed7499",
colorBg: "#635c73",
highlightColor: "#ed7499",
barHeight: 14,
barInset: 10,
fontFamily: "Indie Flower"
});
e.onClick(function() {
e.open();
})
e.onOpen(function() {
fakeLoading(e, 2, 0.5);
});
e.onFail(function() {
e.close();
})
</code></pre>
</div>
</div>
</div><!-- /container -->
<script src="js/jquery.min.js"></script>
<script src="js/TweenMax.min.js"></script>
<script src="js/elastic-progress.js"></script>
<script src="js/main.js"></script>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>
</body>
</html>
非常漂亮的基于jQuery跟TweenMax.js插件实现的弹性滑动动画进度条特效。
本站所有资源都是由网友投搞发布,或转载各大下载站,请自行检测软件的完整性!本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!如有侵权请联系我们删除下架,联系方式:admin@php.cn

