日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

layer弹窗在IOS上,被软键盘挤到上边的解决方法

發布時間:2023/11/27 生活经验 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 layer弹窗在IOS上,被软键盘挤到上边的解决方法 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

就像這種情況,經過多番請教跟嘗試,找到一個能解決這個問題的方法,但可能有點笨重。就是在當前彈框里,設置offset的值,里邊的值可以隨意寫,然后再下邊給彈框追加一個樣式即可。

<!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" /><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><meta name="renderer" content="webkit"><title>解決iOS,layer彈框被軟鍵盤擠上去的問題</title><meta name="description" content="" /><meta name="keywords" content="" /><meta name="robots" content="index,follow" /><!-- 搜索引擎抓取 --><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="x5-fullscreen" content="true"><meta name="full-screen" content="yes"><meta name="screen-orientation" content="portrait"><link rel="stylesheet" type="text/css" href="css/reset.css" /><link rel="stylesheet" href="https://img.huiyiguanjia.com/CDNFile/bootstrap/bootstrap-3.3.7.min.css"><script src="https://img.huiyiguanjia.com/CDNFile/jquery/jquery-2.1.2.min.js"></script><script src="https://img.huiyiguanjia.com/CDNFile/layer/layer-v3.1.1/layer/layer.js"></script>
s</head><body><div class="main"><div class="dataDownload"><style type="text/css">input{margin:20px 0;border-style: none;border: 1px solid blue;width: 100%;}textarea{width:100%}/* .layui-layer-dialog{left: 50%!important;top: 60%;} */</style><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><textarea rows="5" cols="100%"></textarea><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><textarea rows="5" cols="100%"></textarea><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"><input type="text" id="test"></div></div></body>
</html>
<script type="text/javascript">$("input,textarea").focus(function() {if ($(this).val() == '') {layer.msg('Question 2 cannot be empty.', {icon: 7,offset:'heightBox',time: 1001000});$(".layui-layer-dialog").css("top","60%")return false;}});
</script>

?

轉載于:https://www.cnblogs.com/fkcqwq/p/11549232.html

總結

以上是生活随笔為你收集整理的layer弹窗在IOS上,被软键盘挤到上边的解决方法的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。