Mui- 进度条

Posted fdxjava

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mui- 进度条相关的知识,希望对你有一定的参考价值。

<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <title></title>
        <script src="js/mui.min.js"></script>
        <link href="css/mui.min.css" rel="stylesheet" />
        <script type="text/javascript" charset="utf-8">
            mui.init();
        </script>

    </head>

    <body>
        <header class="mui-bar mui-bar-nav">
            <!--顶部导航栏-带返回键-->
            <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
            <h1 class="mui-title">测试属性</h1>
        </header>
        <div class="mui-content">
            <div style="padding: 20px;"><!--为了更好的显示,外层加一个div边距-->
                <div id="demo1" class="mui-progressbar">
                    <span></span>
                </div>
            </div>
            <div style="padding: 0px 20px;">
                <button type="button" onclick="setPro();">展现进度条</button>
            </div>
        </div>
        <script type="text/javascript">
            function setPro()
                /*动画效果*/
                var obj = mui(#demo1);
                var bl = 0;
                setInterval(function()
                    obj.progressbar(progress:bl).show();
                    bl+=10;
                ,1000);
                /*mui(‘#demo1‘).progressbar(progress:50).show();*/
            
        </script>
    </body>

</html>

技术图片

---获取滑块的值

<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <title></title>
        <script src="js/mui.min.js"></script>
        <link href="css/mui.min.css" rel="stylesheet" />
        <script type="text/javascript" charset="utf-8">
            mui.init();
        </script>

    </head>

    <body>
        <header class="mui-bar mui-bar-nav">
            <!--顶部导航栏-带返回键-->
            <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
            <h1 class="mui-title">测试属性</h1>
        </header>
        <div class="mui-content">
            <div style="padding: 20px;padding-top: 80px;">
                <div class="mui-input-row mui-input-range">
                <label>Range</label>
                <input type="range" min="0" max="100" id="range1">
            </div>
            </div>
            <div style="padding: 0px 20px;">
                <button type="button" onclick="getV();">获取滑块的值</button>
            </div>
        </div>
        <script type="text/javascript">
            function getV()
                var obj = mui(#range1);
                var val = obj[0].value;/*获取dao节点为0的*/
                mui.toast(val);
            
        </script>
    </body>

</html>

 

以上是关于Mui- 进度条的主要内容,如果未能解决你的问题,请参考以下文章

mui 滑块开关 进度条 以及如何获取值

进度条编写

请问进度条上方带有文字进度、并且跟随进度条移动的进度条该怎么实现?

android 进度条样式 怎么改

长按如何使进度条变化Android

R语言 进度条