我正在尝试弹出类似的东西,div
当我单击链接时会出现一个。一段时间后,它会消失。我可以div
通过animation.css
. 但我无法让它消失。这是代码:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Clapper</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<link type="text/css" rel="stylesheet" href="animate.css" />
<script type="text/javascript">
function demoDisplay()
{
document.getElementById("clapper").style.display="block";
document.getElementById("clapperBG").style.display="block";
$("#clapper").fadeOut(200);
}
</script>
<!-- STYLES -->
<style>
#clapper {
min-width:200px;
min-height:200px;
top:40%;
background-color:#888;
left:40%;
position:absolute;
z-index:1002;
display:none;
}
#clapperBG {
min-width:100%;
min-height:100%;
background-color:#555;
opacity:0.6;
position:absolute;
display:none;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="main">
<a href="#" onclick="demoDisplay()" > TEST</a>
<div id="clapper" > Some Animation GIF</div>
<div id="clapperBG" class="animated flipInY" >Background</div>
</div>
</div>
<footer>
</footer>
</body>
</html>
请告诉我出了什么问题......我尝试了很多例子$("#clapper").fadeOut(2000);
,甚至在document.ready
但仍然没有好。