开发者

mouse over popup menu

开发者 https://www.devze.com 2023-01-16 07:17 出处:网络
Creating a website using simple html(not html5) and css but got stock in mouseover effect. Need to show some text wit开发者_JAVA技巧h background image when user mouseover a link. Following is an examp

Creating a website using simple html(not html5) and css but got stock in mouseover effect. Need to show some text wit开发者_JAVA技巧h background image when user mouseover a link. Following is an example..

NORMAL:

mouse over popup menu

OVER:

mouse over popup menu

I don't think it is possible to create the effect with simple CSS. My question is what is the most effective way to create the over effect and how? Javascript, DHTML or other language...

Thanks in advance...Rex...


Rex,

I think you would find jQuery very useful. jQuery is a javascript framework, very easy to use. www.jquery.com

You can achieve your effect with pure javascript, but again I think you will find using a javascript framework much easier, since your coming from actionscript.

For your particular instance I would make a div absolutely positioned. To show the div on mouseover you can use the jQuery $("#div_id").show(); and on mouseout use .hide();

Here is a basic tutorial for using show hide on events with jQuery.

http://www.learningjquery.com/2006/09/slicker-show-and-hide

Good luck!


You can use javascript to show a hidden div which is having text written inside it.

use javascript's onmouseover and onmouseout events to do this.

However have you tried using href:hover property of css to achieve this?

0

精彩评论

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