页面1
<div class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
<div class="mui-scroll">
<a class="mui-control-item mui-active">
推荐
</a>
<a class="mui-control-item">
热点
</a>
<a class="mui-control-item">
北京
</a>
<a class="mui-control-item">
社会
</a>
<a class="mui-control-item">
娱乐
</a>
<a class="mui-control-item">
科技
</a>
</div>
</div>
mui.init({
subpages: [{
url: 'list.html', //子页面HTML地址,支持本地地址和网络地址
id: 'list.html', //子页面标志
styles: {
top: '40px', //子页面顶部位置
bottom: '0' //子页面底部位置
},
extras: {} //额外扩展参数
}],
swipeBack: true
});
页面2
<div class="mui-scroll-wrapper">
<div id="pullrefresh">
<div class="mui-scroll">
<div id="sliderImg" 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/4.jpg">
<p class="mui-slider-title">静静看这世界4</p>
</a>
</div>
<!-- 第一张 -->
<div class="mui-slider-item">
<a href="#">
<img src="../../images/1.jpg">
<p class="mui-slider-title">静静看这世界1</p>
</a>
</div>
<!-- 第二张 -->
<div class="mui-slider-item">
<a href="#">
<img src="../../images/2.jpg">
<p class="mui-slider-title">静静看这世界2</p>
</a>
</div>
<!-- 第三张 -->
<div class="mui-slider-item">
<a href="#">
<img src="../../images/3.jpg">
<p class="mui-slider-title">静静看这世界3</p>
</a>
</div>
<!-- 第四张 -->
<div class="mui-slider-item">
<a href="#">
<img src="../../images/4.jpg">
<p class="mui-slider-title">静静看这世界4</p>
</a>
</div>
<!-- 额外增加的一个节点(循环轮播:最后一个节点是第一张轮播) -->
<div class="mui-slider-item mui-slider-item-duplicate">
<a href="#">
<img src="../../images/1.jpg">
</a>
</div>
</div>
<div class="mui-slider-indicator newsImg">
<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 mui-table-view-chevron">
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 1</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 2</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 3</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 4</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 5</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 6</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 7</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 8</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 9</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 10</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 11</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 12</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 13</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 14</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 15</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 16</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 17</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 18</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 19</a>
</li>
<li class="mui-table-view-cell">
<a href="" class="mui-navigate-right">Item 20</a>
</li>
</ul>
</div>
</div>
</div>
mui.init({
pullRefresh: {
container: '#pullrefresh',
down: {
height: 50, //可选,默认50.触发下拉刷新拖动距离,
auto: true, //可选,默认false.自动下拉刷新一次
contentdown: "下拉可以刷新", //可选,在下拉可刷新状态时,下拉刷新控件上显示的标题内容
contentover: "释放立即刷新", //可选,在释放可刷新状态时,下拉刷新控件上显示的标题内容
contentrefresh: "正在刷新...", //可选,正在刷新状态时,下拉刷新控件上显示的标题内容
callback: pulldownRefresh
},
up: {
contentrefresh: '正在加载...',
callback: pullupRefresh
}
}
});
类似网易新闻APP那种怎么做啊?横向滚动的分类在页面2里pullRefresh后就无效了
1 个回复
赵梦欢 - 专注前端,乐于分享!
http://ask.dcloud.net.cn/question/23470