所以有问题的网站:http://kaye.at/baby
下面的主要内容向上滚动倒计时的顶部和导航下的固定元素.这在桌面上工作正常,但在移动游戏中,当用户向上移动时内容滚动倒计时,但一旦触摸释放,它就会弹出.
只是想知道这是一个错误还是可以修复的东西?
这是CSS:
#header { position: fixed; width: 100%; top: 0px; z-index: 10; }
#content { width: 100%; position: relative; top: 650px; z-index: 7; }
#banner { position: fixed; width: 100%; position: fixed; background: url('http://kaye.at/baby/img/stork.jpg') no-repeat center bottom #fff; padding-top: 185px; z-index: 1; }
#defaultCountdown { max-width: 70%; height: auto; }
Run Code Online (Sandbox Code Playgroud)
和HTML(主要结构):
<div id="header">
<div id="nav">
<ul>
<li><a class="active" href="index.php">START</a></li>
<li><a href="ultrasound-images.php">ULTRASOUND PICS</a></li>
<li><a href="pinkorblue.php">PINK OR BLUE?</a></li>
</ul>
</div>
</div>
<div id="banner">
<div id="defaultCountdown"></div>
</div>
<div …Run Code Online (Sandbox Code Playgroud) 我有一个带有简单 css 的 PHP Web 应用程序。当我在 Android 平板电脑上运行该应用程序并尝试登录时,软触摸键盘会弹出并隐藏我的文本输入字段。我曾尝试在堆栈溢出上搜索类似问题,但所有问题都与 asp.net 相关。没有特别提到其他语言。我试过把下面的解决方案,但没有奏效:
//在document.ready函数上添加了这个
if(navigator.userAgent.indexOf('Android') > -1){
$('html').css({ "overflow": "auto !important" });
$('body').css({ "height": "auto !important" });
$('body').css({ "overflow": "auto !important" });
$('.scrollable').css({ "position": "inherit !important" });
$('body').on('focusin', 'input, textarea', function(event) {
//alert("test");
var scroll = $(this).offset();
window.scrollTo(0, scroll);
});
}
Run Code Online (Sandbox Code Playgroud)
或
//添加到 css 文件中
html {
overflow: auto;
}
body {
height:auto;
overflow: auto;
}
.scrollable {
position:inherit;
}
Run Code Online (Sandbox Code Playgroud)
请帮忙。
谢谢