1,思路:
当你打开页面的时候广告弹出
但你点击关闭的时候,广告消失
2,html代码
1 <div class="a">
2 <span></span>
3 </div>
3,css代码
1 .a{
2 position:fixed;
3 right:0;
4 bottom:0;
5 width:40px;
6 height:40px;
7 background:url("../img/1.jpg");
8 display:none;
9 }
10 .a span{
11 position:absolute;
12 right:0;
13 top:0;
14 width:40px;
15 height:40px;
16 background:url("../img/2.jpg");//这是上边那个关闭图片
17 }
4,jQuery代码
1 $(function(){
2 $(".a")
3 .slideDown()
4 .slideUp(1000)
5 .fadeIn(1000)
6 .find("span").click(function(){
7 $(this).parent().fadeOut();
8 })
9 })