今天做项目的时候发现动用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. 安卓系统浏览器中select下拉按钮无法弹出选择面板奇怪问题解决

    今天遇到个让人崩溃的问题: 平台: 安卓 4.0 描述: 使用 appcan 开发 hybrid 应用,手机上点击下拉选框按钮无法弹出选择面板. 说明: 发现 webkit 内核 position:f ...

  2. jdk之String

    学习几个常用的String方法 1.concat /** * Concatenates the specified string to the end of this string. 连接指定的字符串 ...

  3. magento中对获取的数据在前台进行分页显示

    1.数据加载类class Bf170_Bf170Logistics_Block_Inquiry_Index extends Mage_Core_Block_Template {        publ ...

  4. [Q]系统环境改变导致“未注册”的解决方法

    据用户反映设置账户开机密码后显示未注册, 具体表现: 1. 重装试用版,重新获取注册申请码,发现注册申请码跟原来没有发生变化. 2. 重新使用原来的授权文件注册,但打开后显示未注册. 3. 发现“** ...

  5. HDU 1329 Hanoi Tower Troubles Again!(乱搞)

    Hanoi Tower Troubles Again! Problem Description People stopped moving discs from peg to peg after th ...

  6. 通过字典给类的实体属性赋值生成url字符串

    private static Dictionary<string, string> SortedToDictionary(SortedDictionary<string, strin ...

  7. 浏览器exp使用经验

    0x00背景 windows平台下,浏览器安全是绕不过的话题,其涉及的安全问题涵盖二进制和web,攻击场景也非常多样化: 用户点击攻击者的恶意URL链接被感染恶意代码 访问恶意站点被绕过同源策略窃取c ...

  8. C++线程安全的单例模式

    1.在GCC4.0之后的环境下: #include <iostream> using namespace std;template <typename T>class Sing ...

  9. 利用poi向excle写入数据

    import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;import org ...

  10. 简单的java程序通过对话框输出 计算加减乘除运算(运算方法可选择)

    import javax.swing.JOptionPane; // import class JOptionPane public class Addition { public static vo ...