开发的过程中要实现如下所示的表单页面,但是这个页面老是不能滚动,
后来百度了一下,总算解决了问题,需要用一段js代码来控制div层的滚动。
(function($) {
$(".mui-scroll-wrapper").scroll({});
})(mui);
用这段代码就可以控制页面滚动了。
全部代码如下所示:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!--我的mui.min.css文件是放在MUI/css下面的,请根据你自己的情况进行修改-->
<link href="MUI/css/mui.min.css" rel="stylesheet" />
</head>
<body>
<div class="mui-scroll-wrapper" style="margin-bottom: 80px;background: white;">
<div class="mui-scroll">
<div class="mui-row">
<label style="padding: 0px 10px;">联系人姓名:</label>
<input id="Contacts" style="width: 50%;margin-left:23px" type="text" placeholder="联系人姓名">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">联系人姓名:</label>
<input id="Contacts" style="width: 50%;margin-left:23px" type="text" placeholder="联系人姓名">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">联系人姓名:</label>
<input id="Contacts" style="width: 50%;margin-left:23px" type="text" placeholder="联系人姓名">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">联系人姓名:</label>
<input id="Contacts" style="width: 50%;margin-left:23px" type="text" placeholder="联系人姓名">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">联系人姓名:</label>
<input id="Contacts" style="width: 50%;margin-left:23px" type="text" placeholder="联系人姓名">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">联系人姓名:</label>
<input id="Contacts" style="width: 50%;margin-left:23px" type="text" placeholder="联系人姓名">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">联系人姓名:</label>
<input id="Contacts" style="width: 50%;margin-left:23px" type="text" placeholder="联系人姓名">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">联系人姓名:</label>
<input id="Contacts" style="width: 50%;margin-left:23px" type="text" placeholder="联系人姓名">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">联系人姓名:</label>
<input id="Contacts" style="width: 50%;margin-left:23px" type="text" placeholder="联系人姓名">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">联系人姓名:</label>
<input id="Contacts" style="width: 50%;margin-left:23px" type="text" placeholder="联系人姓名">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">联系人姓名:</label>
<input id="Contacts" style="width: 50%;margin-left:23px" type="text" placeholder="联系人姓名">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">用车人姓名<i class="redStar">*</i>:</label>
<input id="PersonName" style="width: 50%;margin-left:17px" type="text" placeholder="用车人姓名">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">用车人手机号<i class="redStar">*</i>:</label>
<input id="PersonMobile" style="width: 50%;" type="number" placeholder="用车人手机号">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">用车人固话:</label>
<input id="PersonTel" style="width: 50%;margin-left:23px" type="text" placeholder="用车人固话">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">乘车人数<i class="redStar">*</i>:</label>
<input id="PersonCount" style="width: 50%;margin-left:32px" οnkeyup="value=value.replace(/[^\d\.]/g,'')" type="text" placeholder="乘车人数">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">起始地点<i class="redStar">*</i>:</label>
<input id="StartAdress" style="width: 50%;margin-left:32px" type="text" placeholder="起始地点">
</div>
<div class="mui-row">
<label style="padding: 0px 10px;">目的地点<i class="redStar">*</i>:</label>
<input id="EndAdress" style="width: 50%;margin-left:32px" type="text" placeholder="目的地点">
</div>
</div>
</div>
<!--我的mui.min.js文件是放在MUI/js下面的,请根据你自己的情况进行修改-->
<script src="MUI/js/mui.min.js"></script>
<script type="text/javascript">
mui.init();
(function($) {
$(".mui-scroll-wrapper").scroll({});
})(mui);
</script>
</body>
</html>
如果本文对您有所帮助,麻烦点击一下左侧的点赞按钮,谢谢