开发者

CSS Hover Effect

开发者 https://www.devze.com 2023-02-28 02:57 出处:网络
I need to show an additional image once the user hovers over button. How would you go around doing this ideally just using CSS.

I need to show an additional image once the user hovers over button. How would you go around doing this ideally just using CSS.

You can see what I need exactly on the image below, when the users hovers on the brochure button, the vie开发者_运维技巧w brochure button appears.

CSS Hover Effect


with css alone, if you can put an element inside the hovered object, you can do like this:

fiddle here: http://jsfiddle.net/Q67hB/

html:

<div id="one">all the time
    <div id="two">only on hovering one</div>
</div>

css:

#two{
  display: none;  
}
#one:hover #two{
  display: block;
}


In CSS

button:hover {
    background-image: url(someImage.png);
}
0

精彩评论

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