安卓手机微信页面position: fixed位置错误
今天做项目的时候发现动用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>姓 名:</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位置错误的更多相关文章
- error while obtaining ui hierarchy xml file...用 uiautomatorviewer 获取安卓手机软件页面时报错
Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't ...
- 部分安卓手机微信浏览器中使用XMLHttpRequest 2上传图片显示字节数为0的解决办法
前端JS中使用XMLHttpRequest 2上传图片到服务器,PC端和大部分手机上都正常,但在少部分安卓手机上上传失败,服务器上查看图片,显示字节数为0.下面是上传图片的核心代码: HTML < ...
- 关于苹果手机微信端 position: fixed定位top导航栏问题
在移动端,position: fixed定位一般不被识别,或者在ios系统中,获取input焦点时,会导致position: fixed的top失效,下面是我验证过的方法,大家可以试试.<!do ...
- 微信开发者工具获取位置错误(定位到北京)---调用wx.getLocation不出现获取定位提示
微信开发者工具获取不到自己当前的位置可能是以下几个原因: 1.调用wx.getLocation方法之后需要在app.json中声明permission字段 { "pages": [ ...
- 解决ios、微信移动端的position: fixed; 支持性不好的问题 && 禁用下拉暴露黑底的功能
解决ios.微信移动端的position: fixed; 支持性不好的问题 在chrome中的多个部分使用了position: fixed之后,都可以正常的布局,但是放在微信上却出现了不能正常显示的问 ...
- vux中x-input在安卓手机输入框的删除按钮(@on-click-clear-icon)点击没反应
首先看你自己的的版本好,如果在2.6.9以上,我是在git上找到的解决办法,记录一下,希望可以帮到有需要的小伙伴. 在项目中找 node_modules > vux > x-input & ...
- 【微信小程序】view顶部固定或底部固定 + scroll-view中的元素view也可以使用position:fixed;固定选中元素位置
1.顶端固定核心代码如下: <view class="page__hd" style="position:fixed; top:0;width: 750rpx;&q ...
- 移动端web页面使用position:fixed问题
在做移动端项目时,碰到一个很纠结的问题,头部固定的问题,一开始使用fixed,发现一系列的问题, 问题1:footer输入框 focus 状态,footer 被居中,而不是吸附在软键盘上部. 测试环境 ...
- 移动端web页面使用position:fixed问题总结
近期完成了一个新的项目(搜狐直播),其中又涉及到了 fixed(固定位置定位)的问题,在之前的文章<移动Web产品前端开发口诀——“快”>中已经阐述过我对 iScroll 的态度,所以在这 ...
随机推荐
- linux for 使用
第一种:命令使用方法 例子1: cat test.txt 1 2 3 for i in $(cat test.txt) do echo $i done 例子2: for i in 1 2 3 4 do ...
- swift 经典代码收集 和 赏析
代码1:protocol PickableEnum { var displayName: String { get } var permanentID: String { get } static v ...
- C# 语言规范_版本5.0 (第9章 命名空间)
1. 命名空间 C# 程序是利用命名空间组织起来的.命名空间既用作程序的“内部”组织系统,也用作“外部”组织系统(一种向其他程序公开自己拥有的程序元素的方法). using 指令(第 9.4 节)用来 ...
- jetbrain phpstorm 增加或删除一个 live template
打开\.PhpStorm2016.2\config\templates 将xml文件放入该文件夹中 重启! 单独: setting -> editor -> Live Template +
- JavaScript Date对象更进一步
总结分享这个近期开发解决的一个Bug. Javascript的Date对象具有容错性,会自动根据当年的日期根据设置的属性值转换,也就是说Date对象的setDate会影响setMonth,month会 ...
- ios7 实现应用内保真截屏
CGSize size = self.content.bounds.size; UIGraphicsBeginImageContextWithOptions(size, NO, [UIScreen m ...
- c++ inline关键字的理解
1. inline是实现修饰符,而非声明修饰符,所以应该用于实现部分的修饰(你也可以放置inline在声明,但是没有必要) 2. 所有中类中定义的函数都默认声明为inline函数,所有我们不用显示地去 ...
- some links
rename user: http://www.cyberciti.biz/faq/howto-change-rename-user-name-id/
- webuploader限制只上传图片文件
// 如果上传的文件不为图片格式, 那么就提示"上传文件格式不正确" if (file.type!="image/jpg" && file.ty ...
- Eclipse开发中GlassFish 4 重启页面不刷新
现在项目开发用GlassFish4做服务器,测试了几个web项目出现问题,每次编辑源代码后页面不能按照最新编辑好的代码显示. 一次重新运行web项目在服务器上看到publish,点击后运行的是新编辑的 ...