如何在手机缺口中创建弹出窗口?

时间:2014-03-26 07:36:07

标签: javascript html css jquery-mobile cordova

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

1 个答案:

答案 0 :(得分:1)

我认为你不能叠加在状态栏上方(时间,电池信息)。 但如果那不是问题......只需添加一个具有绝对位置的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>