html

  <div class="banner">
            <div class="banner-a">
                <a href="">
                    <img src="./images/09.jpg">
                    <img src="./images/10.jpg">
                </a>
                <div class="xx"><a href="">X</a></div>
            </div>
        </div>
    <script src="js/jquery.min.js"></script>

css

.box{

clear:both;
width:100%;
height:80px;
background-color:#0e0205;
display:block;

}
.box-a{

width:1210px;
margin:0 auto;
height:80px;
position:relative;

}
.box-a img{

position: absolute;

}
.xx{

width:20px;
height:20px;
background:red;
text-align:center;
position:absolute;
top:9px;
right:7px;

}
.xx:hover{

background:#c81600;

}

cookie

//Cookie方法

function haxi(){

    if(getCookie("isClose")){             
        $(".box").hide();
    }else{
        $(".box").show();
    }
    
    $(".xx").click(function(){
        $(".box").fadeOut(1000);

        setCookie("isClose", "1","s10");
    })
}
haxi();

coco
16 声望2 粉丝