javascript - 如何在手机缝隙中创建弹出窗口?

标签 javascript html css jquery-mobile cordova

我想在 phonegap jquery 中创建一个弹出窗口。请帮帮我。我需要单击一个按钮,然后它会显示一个我已附加的弹出窗口。 This is the figure that i want to create using phonegap

最佳答案

我认为您不能覆盖状态栏(时间、电池信息)上方。 但如果这不是问题...只需添加一个具有绝对位置的 div。

#myDiv {
   position: absolute;
   top: 0;
   left: 0;
   width: 100vw;
   height: 100vh;
   background-color: rgba(0,0,0,0.6);
   z-index: 10;
   display: none;
}

<body>
 <div id='myDiv'>
 <!-- add the fields/buttons here -->
 </div>
</body>

<script>
  //jQuery script
 $('#myDiv').show();
</script>

关于javascript - 如何在手机缝隙中创建弹出窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22654347/

相关文章:

javascript 未在页面加载时执行?

javascript - JS if else 语句和计时器

css - 将绝对 DIV 定位到相对 DIV 之外的页面

html - 为什么我的 CSS 不起作用?

javascript - 删除 d3.js 面积图中沿轴的轮廓

javascript - 计算样式未以图形方式显示

html - 将选择标签的背景设置为与父 div 的背景相同

html - CSS 拼图 : How to add background-image and set height/width on empty span?

javascript - 如何在x秒后停止重新加载间隔?

javascript - HTML 使用 JavaScript 添加具有 JQuery 属性的元素