我有一个网站,我希望新用户在加载页面时看到与我们联系。我尝试了很多方法并获得覆盖,但是隐藏并继续进入页面的功能无法正常工作。页面加载覆盖
$(document).ready(function() {
$('#overlay').fadeIn();
});
$('button').click(function() {
$('#overlay').fadeOut(200, "linear");
});
function openNav() {
document.getElementById("myNav").style.height = "100%";
}
function closeNav() {
document.getElementById("myNav").style.height = "0%";
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body>
<div id="myNav" class="overlay">
<h1>Text</h1>
<button>hide</button>
</div>
</body>
</html>
如果关闭弹出窗口的任何建议,请存在共享。
固定覆盖类,并添加就绪功能解决了这一问题的。谢谢 – cowlthor