Html 如何在iOS 7上定位:固定工作?
我已经创建了一个测试网页,演示了Html 如何在iOS 7上定位:固定工作?,html,iphone,ios,uiwebview,mobile-safari,Html,Iphone,Ios,Uiwebview,Mobile Safari,我已经创建了一个测试网页,演示了位置:修复了UIWebView和Mobile Safari上的问题: <!DOCTYPE html> <html style="overflow: hidden; "> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <meta name="
位置:修复了UIWebView
和Mobile Safari上的问题:
<!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>
试验
* {
-webkit点击高亮颜色:rgba(0,0,0,0);
}
身体{
边际:0px;
填充:0px;
}
.全屏{
背景:透明;
显示:块;
位置:绝对位置;
顶部:0;左侧:0;
宽度:100%;
身高:100%;
}
.屏幕{
位置:固定;
左:0px;
顶部:0px;
宽度:100%;
身高:100%;
/*-webkit盒阴影:插入0 10px#0d1f2b;
-moz盒阴影:插入0 10px#0d1f2b;
-o形盒阴影:嵌入0 10px#0d1f2b*/
框阴影:插入0 10px#0d1f2b;
}
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
复制步骤:
在iPad或iPhone上的Mobile Safari上打开演示网页
点击文本区域以显示键盘
向上或向下滚动以查看问题
插入阴影应该沿着浏览器窗口的边缘,但它在页面下方的位置不正确
我如何才能使位置:fixed
正常工作?原始问题没有答案,但它是一个具有相同结果的解决方案。将主体样式更改为以下样式:
.body {
margin: 0px;
padding: 0px;
/*-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;
min-height: 100%;
}
屏幕
元素可能会被删除。我想。全屏
是文本区:
对不起,我已经根据更正的代码写了答案。我已经修好了。。全屏
应用于主体
?我在问题中的代码中看不到这一点。我还添加了一个注释,说明这不是答案,但它是一个解决方案。