0
私は2つのURLを持つ背景を持っています.1つは通常の状態とホバー状態を示しています。 divは空で、幅と高さは50pxに設定されています。それが助けになるかどうかを知るためにパディングを追加しました。空のdivとクリック可能なURL
<div class="container_12 clearfix">
<div class="grid_12">
<p id="footer-center">
<a href="#top" class="top-btn" id="back-to-top"><div class="hover-btn"></div><!--<img src="images/back-to-top-a.png" class="a">--></a>
</p>
</div> <!-- end grid_4-->
</div> <!-- end container_12 -->
.hover-btn{
display:block;
width:50px;
height:50px;
margin-left:50%;
}
.hover-btn{
background:url(../images/back-to-top-a.png) no-repeat center
center;
}
.hover-btn:hover{
background:url(../images/back-to-top-b.png) no-repeat center center, url(../images/back-to-top-a.png) no-repeat center center;
正確にはあなたのクエリは何ですか? – amarnath
Saeed Ludeenの作業コードありがとう – NCweb
ワーキングコードありがとうSaeed Ludeen .hover-btn { \t display:block; \t幅:50px; \t身長:50px; \t margin-left:50%; } .hover-btn:ホバー{ \t背景:URL(../ images/back-to-top-b.png)ノーリピートセンターセンター。 } – NCweb