<a> tag

时间:2016-03-20 17:53:32

标签: html css

please help me. I can't understand why my css code for background image doesn't work.

.fb {
    margin-bottom: 10px;
    width: 160px;
    height:160px;
    display:block;
    background:transparent url('/images/social%20icons/normal/fb.png') center top no-repeat;
}

.fb:hover {
    background-image: url('/images/social%20icons/hover/fb.png');
}
<a href="#" class="fb"></a>
enter image description here

的背景图片

1 个答案:

答案 0 :(得分:1)

这有效:../images/social%20icons/normal/fb.png