可左右拖动(mui-segmented-control)控件,最初为隐藏状态,之后点击按钮恢复为可见状态,但是其中的mui-slider-progress-bar不会随着slider左右移动。
测试代码
<body>
<button id="showBtn">show</button>
<div class="slider-div" style="display: none;">
<div class="mui-slider">
<!--滑动部分的头部-->
<div class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
<a class="mui-control-item mui-active" href="#monthPart">page1</a>
<a class="mui-control-item" href="#yearPart">page2</a>
</div>
<div class="mui-slider-progress-bar mui-col-xs-6"></div>
<!--滑动的主体-->
<div class="mui-slider-group">
<div id="monthPart" class="mui-slider-item mui-control-content mui-active">
<div>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
</div>
<div id="yearPart" class="mui-slider-item mui-control-content">
<div>
<ul>
<li>11</li>
<li>12</li>
<li>13</li>
<li>14</li>
<li>15</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript" charset="utf-8">
mui.init();
document.getElementById("showBtn").addEventListener("tap",function(){
document.querySelector(".slider-div").style.display = "block";
});
</script>
bug现象
3 个回复
西西里
我觉得你可以切换一下mui-active属性
5***@qq.com
碰到相同的问题
我爱热可乐
同问