m***@163.com
m***@163.com
  • 发布:2017-06-03 10:29
  • 更新:2017-06-03 15:46
  • 阅读:1130

哪位帮我看看 怎么不能滚动?

分类: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.css" rel="stylesheet"/>
</head>
<body>
<div class="mui-scroll-wrapper">
<div class="mui-scroll">
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
<p>滚动</p>
</div>
</div>
<script type="text/javascript" charset="utf-8">
mui(".mui-scroll-wrapper").scroll = ({
scrollY:true,
scrollX:false,
startX:0,
startY:0,
indicators:true,
deceleration:0.0006,
bounce:true
})
</script>
</body>
</html>

2017-06-03 10:29 负责人:无 分享
已邀请:
LLgg

LLgg

把后面的script替换成下面的

<script>  
            mui.init();  
            (function($) {  
                var deceleration = mui.os.ios?0.003:0.0006;    //判断安卓还是ios,设置不同阻尼系数  
                $('.mui-scroll-wrapper').scroll({  
                scrollY: true,  
                scrollX: false,  
                startX: 0,  
                startY: 0,  
                indicators: true,    //是否显示滚动条  
                deceleration: deceleration,     //阻尼系数  
                bounce: true  
                });  
            })(mui);  
        </script>

这是我的网站,O(∩_∩)O谢谢支持----->>中旋网ZxlmWeb

LLgg

LLgg

完整代码

<!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" />  
    </head>  

    <body>  
        <div class="mui-scroll-wrapper">  
            <div class="mui-scroll">  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  
                <p>滚动</p>  

            </div>  
        </div>  
        <script>  
            mui.init();  
            (function($) {  
                var deceleration = mui.os.ios?0.003:0.0006;    //判断安卓还是ios,设置不同阻尼系数  
                $('.mui-scroll-wrapper').scroll({  
                scrollY: true,  
                scrollX: false,  
                startX: 0,  
                startY: 0,  
                indicators: true,    //是否显示滚动条  
                deceleration: deceleration,     //阻尼系数  
                bounce: true  
                });  
            })(mui);  
        </script>  
    </body>  

</html>

该问题目前已经被锁定, 无法添加新回复