Android Webkit:绝对定位的元素不尊重z-index [英] Android Webkit: Absolutely positioned elements don't respect z-index

查看:202
本文介绍了Android Webkit:绝对定位的元素不尊重z-index的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

讨厌的小臭虫,这一个。

Nasty little bug, this one.

Android ticket 6721 ,Android浏览器似乎不尊重z-index,当绝对定位的元素放置在< a> < input> 标记。
我绝望任何解决方法。以前有人征服过这个?

As illustrated in Android ticket 6721, the Android browser seems to not respect z-index when absolutely positioned elements are laid over the top of <a> or <input> tags. I am desperate for any sort of workaround. Has anybody conquered this one before?

提前感谢!

推荐答案

这个问题可能与控件相关,它们是浏览器特有的。在看看你的问题(铬),我发现一个相关的问题,当你按Tab键,你仍然能够集中输入元素。你可能不想要这个(无论是否出血)。解决方案非常简单,您编写脚本以将 disabled 属性添加到所有输入/按钮/ etc。覆盖的元素。禁用的输入将无法接收焦点(通过键盘或其他),并点击它应该是不可能的。

This problem is probably related to controls and their being special for the browser. While looking at your problem (in chromium) I found a related problem that when you press the tab key you will still be able to focus the input elements. You probably don't want this either (regardless of bleedthrough). The solution is surprisingly simple, you write your script to add the disabled attribute to all input/button/etc. elements that are overlayed. A disabled input will not be able to receive focus (by keyboard or otherwise), and clicking it should be impossible.

由于这也禁用愚蠢的键盘环游,它甚至不是一个解决方法,但更好的设计,也适用于键盘基于导航。

As this also disables silly keyboard circumnavigation it is not even a workaround, but a better design that also works with keyboard based navigation as expected.

这篇关于Android Webkit:绝对定位的元素不尊重z-index的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆