今天小編為大家介紹一個(gè)新的html框架AmazaUI,那么就有小伙伴提出了:“在html5的AmazeUI框架中怎么實(shí)現(xiàn)加載進(jìn)度條?”這個(gè)問題,下面是小編整理的相關(guān)內(nèi)容!
本文主要介紹了AmazeUI 加載進(jìn)度條的實(shí)現(xiàn)示例,分享給大家,具體如下:
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>加載進(jìn)度條</title>
<link rel="stylesheet" href="assets/css/amazeui.min.css">
<!--[if (gte IE 9)|!(IE)]><!-->
<script src="assets/js/jquery.min.js"></script>
<!--<![endif]-->
<!--[if lte IE 8 ]>
<script src="assets/ie8/jquery.min.js"></script>
<script src="assets/ie8/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->
<script src="assets/js/amazeui.min.js"></script>
</head>
<body style="margin: 10px;">
<!--基本使用-->
<button id="np-s" class="am-btn am-btn-primary">$.AMUI.progress.start();</button>
<button id="np-d" class="am-btn am-btn-success">$.AMUI.progress.done();</button>
<script>
$(function(){
var progress = $.AMUI.progress;
$('#np-s').on('click', function() {
progress.start();
});
$('#np-d').on('click', function() {
progress.done();
});
});
</script>
<br><br>
<!--高級(jí)使用-->
<button id="np-set" class="am-btn am-btn-primary">$.AMUI.progress.set(0.4);</button>
<button id="np-inc" class="am-btn am-btn-warning">$.AMUI.progress.inc();</button>
<button id="np-fd" class="am-btn am-btn-success">$.AMUI.progress.done(true);</button>
<button id="np-status" class="am-btn am-btn-danger">$.AMUI.progress.status;</button>
<script>
$(function(){
var progress = $.AMUI.progress;
$('#np-set').on('click', function() {
progress.set(0.4);
});
$('#np-inc').on('click', function() {
progress.inc();
});
$('#np-fd').on('click', function() {
progress.done(true);
});
$('#np-status').on('click', function() {
$(this).text('Status: ' + progress.status);
});
});
</script>
</body>
</html>
效果圖:
通過這篇文章大家對(duì)于:“在html5的AmazeUI框架中怎么實(shí)現(xiàn)加載進(jìn)度條?”這個(gè)問題應(yīng)該有了不少的了解吧!當(dāng)然了隨著不斷的更新迭代我們需要學(xué)習(xí)的內(nèi)容就會(huì)更多,有感興趣的小伙伴們都可以在W3Cschool中進(jìn)行一個(gè)全面的學(xué)習(xí)!