iPad Iframe幽灵Bug
如果iframe位于div位置固定的页面中,并且在iframe中有一些位置固定的元素,则在iframe中键入一些输入/文本区域字段后,iframe将消失 index.html:iPad Iframe幽灵Bug,ipad,iframe,safari,css-position,Ipad,Iframe,Safari,Css Position,如果iframe位于div位置固定的页面中,并且在iframe中有一些位置固定的元素,则在iframe中键入一些输入/文本区域字段后,iframe将消失 index.html: <!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <div style="position: fixed; width: 250p
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="position: fixed; width: 250px; height: 250px; top: 0px; right: 0px; border: solid 2px red;">
<iframe src="iframe.html" style="width: 250px; height: 250px;"></iframe>
</div>
</body>
</html>
iframe.html:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="position: fixed">
<input type="text" placeholder="type here" /><br>
start typing above in iPad and after 1st char this iframe will be moved to the left side and after 2nd char it will completely dissapear
(tested on iPad 2; iOS 9.0.2; Safari 601.1)
</div>
</body>
</html>
开始在iPad中输入上面的内容,在第一个字符之后,这个iframe将移到左侧,在第二个字符之后,它将完全消失
(在iPad 2、iOS 9.0.2、Safari 601.1上测试)
演示:
你知道怎么修吗?注意:不能删除/替换固定位置,在index.html中不能添加全局样式-仅针对div及其子元素