今天做项目的时候发现动用position: fixed做弹窗时,用margin-top:50%这样外边距来响应式的控制位置时,在微信里打开页面的弹窗,弹窗在手机上显示的位置和实际上在手机上的位置不一样,让人点击上面时并没有反应,其实他实际位置时在眼睛看到的位置上方许多,点击上方许多的位置时,才触发眼睛看到的地方的元素被点击的事件,这是为毛啊?UC浏览器都是正常的,微信最近更新作死吗,害我调整了好久,最好用top来代替margin-top了

贴上问题代码

<div class="pop_bg"></div>
<div class="pop_content">
<div class="pop_message">
<form id="baoming_from" name="" action="">
<p>请填写您的个人信息</p>
<ul>
<li><label>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名:</label><input type="text" name="name" myAttr="姓名"></li>
<li><label>联系电话:</label><input type="text" name="phone" myAttr="联系电话"></li>
<li><input type="button" value="报名" class="baoming_btn"></li>
</ul>
</form>
<div class="baoming_tip">
<div class="baoming_tip_box"><img src="data:images/xiaolian.jpg"><span>报名成功</span></div>
<button value="关闭" class="baoming_close">关闭</button>
</div>
</div>
</div>

下面CSS

    /*公共弹窗样式*/
.pop_bg{ position: fixed; top:; left:; width: 100%; height: 100%; background-color: #343434; opacity: 0.15; z-index:; display: none;}
.pop_content{ width: 73.75%; padding-bottom:53.4375%; position: fixed; top: 15%; left: 50%; margin-left: -36.875%; margin-top: 0%; /*这里的margin-top用top代替了*/ background-color: #fff; z-index:; max-width: 470px; display: none;} .pop_message p{ text-align: center; margin-top: 10.42%; margin-bottom: 8.94%;}
#baoming_from{ /*display: none;*/}
.pop_message li{ margin-bottom: 5.1%;}
.pop_message label{ width: 33.05%; font-size: 25px; line-height: 1.8; text-align: right; margin-bottom:; font-weight:;}
.pop_message input{ width: 59.3%; margin-right:7.65%; line-height: 1.8; border: none; background-color: #f2f2f2; text-indent: 0.5em;}
#baoming_from .baoming_btn,.baoming_close{ display: block; color: #fff; margin-left: 33.05%; width: 31.915%; background-color: #da2737; line-height:; text-align: center; border-radius: 4px;}
.baoming_tip{ text-align: center; display: none;}
.baoming_tip_box{ margin-top: 21.28%; margin-bottom: 17.02%;}
.baoming_tip_box img{ margin-right: 6.8%; width: 15.11%;}
.baoming_tip_box span{ line-height: 70px;}

安卓手机微信页面position: fixed位置错误的更多相关文章

  1. error while obtaining ui hierarchy xml file...用 uiautomatorviewer 获取安卓手机软件页面时报错

    Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't ...

  2. 部分安卓手机微信浏览器中使用XMLHttpRequest 2上传图片显示字节数为0的解决办法

    前端JS中使用XMLHttpRequest 2上传图片到服务器,PC端和大部分手机上都正常,但在少部分安卓手机上上传失败,服务器上查看图片,显示字节数为0.下面是上传图片的核心代码: HTML < ...

  3. 关于苹果手机微信端 position: fixed定位top导航栏问题

    在移动端,position: fixed定位一般不被识别,或者在ios系统中,获取input焦点时,会导致position: fixed的top失效,下面是我验证过的方法,大家可以试试.<!do ...

  4. 微信开发者工具获取位置错误(定位到北京)---调用wx.getLocation不出现获取定位提示

    微信开发者工具获取不到自己当前的位置可能是以下几个原因: 1.调用wx.getLocation方法之后需要在app.json中声明permission字段 { "pages": [ ...

  5. 解决ios、微信移动端的position: fixed; 支持性不好的问题 && 禁用下拉暴露黑底的功能

    解决ios.微信移动端的position: fixed; 支持性不好的问题 在chrome中的多个部分使用了position: fixed之后,都可以正常的布局,但是放在微信上却出现了不能正常显示的问 ...

  6. vux中x-input在安卓手机输入框的删除按钮(@on-click-clear-icon)点击没反应

    首先看你自己的的版本好,如果在2.6.9以上,我是在git上找到的解决办法,记录一下,希望可以帮到有需要的小伙伴. 在项目中找 node_modules > vux > x-input & ...

  7. 【微信小程序】view顶部固定或底部固定 + scroll-view中的元素view也可以使用position:fixed;固定选中元素位置

    1.顶端固定核心代码如下: <view class="page__hd" style="position:fixed; top:0;width: 750rpx;&q ...

  8. 移动端web页面使用position:fixed问题

    在做移动端项目时,碰到一个很纠结的问题,头部固定的问题,一开始使用fixed,发现一系列的问题, 问题1:footer输入框 focus 状态,footer 被居中,而不是吸附在软键盘上部. 测试环境 ...

  9. 移动端web页面使用position:fixed问题总结

    近期完成了一个新的项目(搜狐直播),其中又涉及到了 fixed(固定位置定位)的问题,在之前的文章<移动Web产品前端开发口诀——“快”>中已经阐述过我对 iScroll 的态度,所以在这 ...

随机推荐

  1. XTU 1252 Defense Tower

    $2016$长城信息杯中国大学生程序设计竞赛中南邀请赛$J$题 贪心. 优先删除$power$大的点. #pragma comment(linker, "/STACK:1024000000, ...

  2. ASP.NET网站怎么发布 Web项目程序怎么发布部署(暂时收藏)

    Web程序如何发布部署呢.网站项目做好了,需要发布出来,提交给客户,装上服务器.那怎么在ASP.NET开发环境中将网站程序发布出来呢 ^_^   工具/原料 Visual Studio 2010  ( ...

  3. 利用java实现抽奖转盘(着重安全控制)

    本文是针对jquery 实现抽奖转盘作者的一个补充(主要用java去实现转盘结果生成及存储,解决jquery 做法 非法用户采用模拟器实现改变转盘值的风险性),针对jQuery的具体实现,请看案例:h ...

  4. java中的d单例模式

    public class SimpleDemo1 { //恶汉式 //类初始化时,立即加载这个对象(没有延时加载的优势).加载类时,天然的是线程安全的 private static final Sim ...

  5. background-size (设置背景图片的大小)

    设置背景图片的大小,以长度值或百分比显示(数值包括 长度length和百分比percentage),还可以通过cover和contain来对图片进行伸缩. 语法:background-size: au ...

  6. php 便利数组方法

    数组在PHP中是一个非常强大的武器,用起来方便.容易,由于使用起来异常灵活,用它就可以实现数据结构中的链表.栈.队列.堆以及所谓的字典.集合等,也可以转换成XML格式. 1.使用for for语句遍历 ...

  7. Linux下获取IP、MAC、网关、掩码的shell脚本

    Mask:ifconfig |grep inet| sed -n '1p'|awk '{print $4}'|awk -F ':' '{print $2}'IP:ifconfig |grep inet ...

  8. 显示hibernate的sql语句

    <property name="show_sql">true</property> <property name="format_sql&q ...

  9. tomcat + jenkins启动tomcat后打开jenkins页面提示404错误的解决方案

    首先下载tomcat和jenkins,将下载的jenkins2.12 war放到tomcat的webapps文件夹下后执行/bin文件夹下的start启动后,打开http://localhost:80 ...

  10. C#中string.Substring 的用法

    String.SubString(int  startIndex,int length)     startIndex:截取字符串开始的位置       length:截取字符串的长度 例子:用户 输 ...