および Mobile Safariでのposition:fixed
問題を示すテスト Web ページを作成しました。UIWebView
<!DOCTYPE html>
<html style="overflow: hidden; ">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.2, user-scalable=no">
<title>Test</title>
<style type="text/css">
* {
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
body {
margin: 0px;
padding: 0px;
}
.fullscreen {
background: transparent;
display: block;
position: absolute;
top: 0; left: 0;
width: 100%;
height: 100%;
}
.screen {
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
/*-webkit-box-shadow: inset 0 0 10px #0d1f2b;
-moz-box-shadow: inset 0 0 10px #0d1f2b;
-o-box-shadow: inset 0 0 10px #0d1f2b;*/
box-shadow: inset 0 0 10px #0d1f2b;
}
</style>
</head>
<body>
<div class="screen" id="screen"></div>
<form><textarea id="code" name="code" class="fullscreen" rows="1">
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
</textarea></form>
</body>
</html>
再現する手順:
- iPad または iPhone の Mobile Safari でデモ Web ページを開きます。
- テキストエリアをタップしてキーボードを表示します。
- 上下にスクロールして問題を確認します。
挿入された影はブラウザー ウィンドウの端に沿っているはずですが、ページのさらに下に誤って配置されています。
どうすればposition:fixed
適切に動作させることができますか?