今天做项目的时候发现动用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. 推荐几个在线PDF转化成Word网站

    不想安装专业的pdf转换成word软件,希望大家喜欢!昨天用的https://www.pdftoword.com/# 成功搞定! 1.Free-PDFtoWord 在线转换工具: 地址:http:// ...

  2. 利用before、after制作提示框

    提示框由两部分组成,框+箭头,箭头则利用伪元素before.after写成. 根据提示框的样式可以看出,上面的箭头由两部分组成:灰色大箭头+蓝色小箭头,蓝色嵌套在灰色里面,于是箭头就有了边框,整体搭配 ...

  3. gulp插件大全

    原文:http://www.mamicode.com/info-detail-517085.html No.1.run-sequence   作用:让gulp任务,可以相互独立,解除任务间的依赖,增强 ...

  4. MySql 安装过程(摘自网络)

    下面的是MySQL安装的图解,用的可执行文件安装的,详细说明了一下! 打开下载的mysql安装文件mysql-5.0.27-win32.zip,双击解压缩, 运行“setup.exe”,出现如下界面 ...

  5. 世界之窗(TheWorld)浏览器 3.6.1.0 简体中文绿色版

    软件名称: 世界之窗(TheWorld)浏览器 3.6.1.0 简体中文绿色版软件语言: 简体中文授权方式: 免费软件运行环境: Win7 / Vista / Win2003 / WinXP 软件大小 ...

  6. 七天学会ASP.NET MVC(1-3)源代码下载

    原文路径: 中文: http://www.cnblogs.com/powertoolsteam/p/MVC_one.html 英文:  http://www.codeproject.com/Artic ...

  7. wall time

    "showing elapsed time and wall clock time correspondingly." what's difference between elap ...

  8. 非root用户搭建hadoop伪分布式

    0.安装软件列表 jdk-7u25-linux-x64.tar.gz hadoop-2.5.0.tar.gz hadoop-native-64-2.5.0.tar   1.准备Linux环境(root ...

  9. SQLServer中的变量:局部变量,全局变量

    SQLServer中的全局变量   变量 Transact-SQL语言中有两种形式的变量,一种是用户自己定义的局部变量,另外一种是系统提供的全局变量.局部变量 局部变量是一个能够拥有特定数据类型的对象 ...

  10. Weex-进阶笔记二

    p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica; color: #945200 } p.p2 { margin: 0.0p ...