how to add a link to the background image in the css code
this is the css code
#header #phone{
background: url(../images/icon.jpg) no-repeat right 0px;
position: absolute;
top: 41px;
}
my question is how can I add a link to the icon.jpg ima开发者_如何学编程ge
thanks
one of the tricks is :
http://xavisys.com/css-trick-turning-a-background-image-into-a-clickable-link/
make the link the same size as the image . Since an anchor tag isn’t a block level element, we need to force it to display as “block" & hide the text. This can be done using “text-indent” and indenting the text completely off.
精彩评论