CSS hover upon a link to fill background
What I want:
When I hover upon a lin开发者_如何学Ck it should fill the background with a fixed width (say 225 pixels) background color. The length of the text of the link should not be considered.
How can I achieve this?
a:hover {background: url('some225pxWideImage.jpg') no-repeat;}
HTML:
<a class="someclass">Some link</a>
CSS:
a.someclass {
display: block;
width: 225px;
}
a.someclass:hover {
background-color: #123456;
}
精彩评论