html
<!--top-banner start 部分-->
<div class="top-banner">
<div class="w tb">
<a href="#">
<img src="img/top-banner.jpg" />
</a>
<a class="close-banner"></a>
</div>
</div>
<!--top-banner end 部分-->
css:
.top-banner{
background-color: #37c2fb;
}
.tb{
position: relative;
}
.close-banner {
position: absolute;
width: 19px;
height: 19px;
top: 7px;
right: -4px;
background: url(../img/close-banner.png) no-repeat;
}
.close-banner:hover{
background-position: bottom;
}