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 })    

 

相关文章:

  • 2021-09-08
  • 2022-12-23
  • 2021-07-13
  • 2021-12-22
  • 2021-06-10
  • 2021-04-23
  • 2021-07-07
猜你喜欢
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2021-04-19
  • 2021-10-18
  • 2022-12-23
相关资源
相似解决方案