如图所示,怎么都无法让页面滚动,但是侧滑的导航里面的内容就能滚动。 写法都一样的,不知道怎么回事,求大牛指教!!!
代码:
<!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>
<link href="css/mui.css" rel="stylesheet" />
<link href="css/font-awesome.min.css" rel="stylesheet" />
<style type="text/css">
.userAvatar .mui-table-view:before,
.userAvatar .mui-table-view:after,
.userAvatar .mui-table-view-cell:before,
.userAvatar .mui-table-view-cell:after {
background-color: transparent;
}
.mem-nav-h {
display: flex;
text-align: center;
background-color: #2E374D;
padding: 10px 0;
}
.mem-nav-h div {
flex: 1;
}
</style>
</head>
<body>
<!-- 主界面菜单同时移动 -->
<!-- 侧滑导航根容器 -->
<div class="mui-off-canvas-wrap mui-draggable">
<!-- 主页面容器 -->
<div class="mui-inner-wrap">
<!-- 菜单容器 -->
<aside class="mui-off-canvas-left" id="offCanvasSide" style="background-color: #1D263C;color: white;">
<div class="mui-scroll-wrapper" style="margin-bottom: 25px;">
<div class="mui-scroll userAvatar">
<!-- 菜单具体展示内容 -->
<ul class="mui-table-view" style="background-color: transparent;margin-top: 45px;border: 0 none;">
<li class="mui-table-view-cell mui-media">
<a href="javascript:;">
<img class="mui-media-object mui-pull-left" src="images/shuijiao.jpg" style="border-radius: 50%;border: 2px solid white;max-width: 60px;height: 60px;">
<div class="mui-media-body" style="margin-top: 10px;">
伊泽瑞尔
<div>
<i class="fa fa-circle" aria-hidden="true" style="color: #AA7B51;"></i> 青铜
<i class="fa fa-star" aria-hidden="true" style="color: #AA7B51;"></i>
<i class="fa fa-star" aria-hidden="true" style="color: #AA7B51;"></i>
<i class="fa fa-star" aria-hidden="true" style="color: #AA7B51;"></i>
</div>
</div>
</a>
</li>
<li class="mui-table-view-cell">
<a href="javascript:;">
"为了更美好的明天而战"
</a>
</li>
</ul>
<div class="mem-nav-h">
<div>
<div>1000</div>
<div>积分</div>
</div>
<div>
<div>500</div>
<div>鱼豆</div>
</div>
<div>
<div>20</div>
<div>粉丝</div>
</div>
<div>
<div>10</div>
<div>关注</div>
</div>
</div>
<ul class="mui-table-view" style="background-color: transparent;">
<li class="mui-table-view-cell"><i class="fa fa-star" aria-hidden="true" style="color: #AA7B51;"></i>我的角色 <span class="mui-badge mui-badge-danger">14</span></li>
<li class="mui-table-view-cell">我的约战<span class="mui-badge mui-badge-danger">1</span></li>
<li class="mui-table-view-cell">我的竞猜<span class="mui-badge mui-badge-danger">5</span></li>
<li class="mui-table-view-cell" style="border-bottom: 1px solid #292C33;">排行榜</li>
<li class="mui-table-view-cell">我的消息<span class="mui-badge mui-badge-danger">5</span></li>
<li class="mui-table-view-cell">我的评论</li>
<li class="mui-table-view-cell">我的账户</li>
</ul>
</div>
<div style="position: fixed;bottom: 0;">设置</div>
</div>
</aside>
<!-- 主页面标题 -->
<header class="mui-bar mui-bar-nav" style="background-color: rgb(29, 38, 60);">
<a class="mui-icon mui-action-menu mui-icon-bars mui-pull-left" href="#offCanvasSide"></a>
<h1 class="mui-title">新闻资讯</h1>
<a><span class="mui-icon mui-icon-search mui-pull-right" style="color: white;"></span></a>
</header>
<nav class="mui-bar mui-bar-tab">
<a class="mui-tab-item mui-active">
<span class="mui-icon mui-icon-home"></span>
<span class="mui-tab-label">新闻</span>
</a>
<a class="mui-tab-item">
<span class="mui-icon mui-icon-phone"></span>
<span class="mui-tab-label">竞猜</span>
</a>
<a class="mui-tab-item">
<span class="mui-icon mui-icon-email"></span>
<span class="mui-tab-label">约战</span>
</a>
<a class="mui-tab-item">
<span class="mui-icon mui-icon-gear"></span>
<span class="mui-tab-label">赛事</span>
</a>
<a class="mui-tab-item">
<span class="mui-icon mui-icon-gear"></span>
<span class="mui-tab-label">战队</span>
</a>
</nav>
<!-- 主页面内容容器 -->
<div class="mui-content">
<div class="mui-scroll-wrapper">
<div class="mui-scroll">
<!-- 主界面具体展示内容 -->
<div id="slider" class="mui-slider ">
<div class="mui-slider-group mui-slider-loop">
<!-- 额外增加的一个节点(循环轮播:第一个节点是最后一张轮播) -->
<div class="mui-slider-item mui-slider-item-duplicate">
<a href="#">
<img src="images/yuantiao.jpg">
<p class="mui-slider-title">静静看这世界</p>
</a>
</div>
<div class="mui-slider-item">
<a href="#">
<img src="images/shuijiao.jpg">
<p class="mui-slider-title">幸福就是可以一起睡觉</p>
</a>
</div>
<div class="mui-slider-item">
<a href="#">
<img src="images/muwu.jpg">
<p class="mui-slider-title">想要一间这样的木屋,静静的喝咖啡</p>
</a>
</div>
<div class="mui-slider-item">
<a href="#">
<img src="images/cbd.jpg">
<p class="mui-slider-title">Color of SIP CBD</p>
</a>
</div>
<div class="mui-slider-item">
<a href="#">
<img src="images/yuantiao.jpg">
<p class="mui-slider-title">静静看这世界</p>
</a>
</div>
<!-- 额外增加的一个节点(循环轮播:最后一个节点是第一张轮播) -->
<div class="mui-slider-item mui-slider-item-duplicate">
<a href="#">
<img src="images/shuijiao.jpg">
<p class="mui-slider-title">幸福就是可以一起睡觉</p>
</a>
</div>
</div>
<div class="mui-slider-indicator mui-text-right">
<div class="mui-indicator mui-active"></div>
<div class="mui-indicator"></div>
<div class="mui-indicator"></div>
<div class="mui-indicator"></div>
</div>
</div>
<ul class="mui-table-view">
<li class="mui-table-view-cell mui-media">
<a href="javascript:;">
<img class="mui-media-object mui-pull-left" src="images/shuijiao.jpg">
<div class="mui-media-body">
幸福
<p class="mui-ellipsis">能和心爱的人一起睡觉,是件幸福的事情;可是,打呼噜怎么办?</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="javascript:;">
<img class="mui-media-object mui-pull-left" src="images/muwu.jpg">
<div class="mui-media-body">
木屋
<p class="mui-ellipsis">想要这样一间小木屋,夏天挫冰吃瓜,冬天围炉取暖.</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="javascript:;">
<img class="mui-media-object mui-pull-left" src="images/cbd.jpg">
<div class="mui-media-body">
CBD
<p class="mui-ellipsis">烤炉模式的城,到黄昏,如同打翻的调色盘一般.</p>
</div>
</a>
</li>
<li class="mui-table-view-cell mui-media">
<a href="javascript:;">
<img class="mui-media-object mui-pull-left" src="images/cbd.jpg">
<div class="mui-media-body">
CBD
<p class="mui-ellipsis">烤炉模式的城,到黄昏,如同打翻的调色盘一般.</p>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</body>
<script src="js/mui.min.js"></script>
<script>
mui.init({
swipeBack: true //启用右滑关闭功能
});
mui('.mui-scroll-wrapper').scroll();
var slider = mui("#slider");
slider.slider({
interval: 1000
});
</script>
</html>
猜测可能是:
这个的原因,这个在案例里面是做上拉下拉刷新用的。