开发者

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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜