要做一个ajax访问后台时 弹出一个div等待 不让用户做任何操作 滚轮也不能动
4条回答 默认 最新
- 前端-珊珊 2017-10-26 08:36关注
不知道你的布局怎么样的,但一般情况下,
html,body{
height:100%;
width:100%;
overflow:hidden;
}这样就可以没有滚动条了。但我觉得要不给用户操作还是像上面那哥们说的那样,自己做个遮罩或者弹框,不给用户点击。例子往下 <div class="pop"></div>
您已成功支付押金,点击“确认”进入个人中心页面查看租赁记录
确定/*弹出*/
.pop{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.3);
display: none;
z-index:2;
}
/*询问内容*/
.pop_content{
width: 70%;
height: 100px;
background: #fff;
position: absolute;
top: 50%;
left: 50%;
display: none;
border-radius: 10px;
transform: translate(-50%,-50%);
z-index: 3;
}.pop_content>p{
width: 100%;
height: 75%;
padding-left: 24px;
padding-right: 24px;
font-size: 0.32rem;
padding-top: 18%;
line-height: 45px;
text-align: center;
}
/*选择确定或取消*/
.yes_or_no{
width: 100%;
height: 25%;
overflow: hidden;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
/*确定,取消*/
#confirm{
width: 100%;
height: 100%;
border: none;
outline: none;
background: #fff;
color: #0A7046;
font-weight: bold;
font-size: 26px;
border-top: 1px solid #CDCDCD;
}本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥100 为什么这个恒流源电路不能恒流?
- ¥15 有偿求跨组件数据流路径图
- ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
- ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
- ¥15 CSAPPattacklab
- ¥15 一直显示正在等待HID—ISP
- ¥15 Python turtle 画图
- ¥15 stm32开发clion时遇到的编译问题
- ¥15 lna设计 源简并电感型共源放大器
- ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)