有没有一种方法可以专注于该领域,但又没有这种不和谐的动画?当键盘可见时,这种行为尤其糟糕。
演示
http://plnkr.co/edit/9OydOFO0KUeKuaH8u70A?p=info
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<form>
<input>
<input>
<input>
<input>
<input>
...
<input>
</form>
</body>
</html>
最佳答案
经过更多研究,这似乎与 iOS 中的焦点跳跃错误有关。 ( https://remysharp.com/2012/05/24/issues-with-position-fixed-scrolling-on-ios#focus-jumping )
在某些情况下修复它的一个巧妙技巧是设置 float: left; clear: left;
在输入字段 ( Jumping input fields in Safari )
但是,如果它需要与 position: fixed
元素交互,则该修复不起作用。跳跃错误仍然存在。
关于html - 在移动 Safari 中通过输入字段进行制表会使浏览器跳转,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31126330/