如何创建用户名悬停下拉菜单 [英] how to Create username hover dropdown menu

查看:55
本文介绍了如何创建用户名悬停下拉菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我希望在登录的用户名hover上创建一个下拉菜单。就像在这个(codeproject)网站上,当你将鼠标悬停在你的用户名上时,会带来一个下拉菜单。



类似的例子是linkedin网站..



如果可能的话,请提供一些关于如何实施这个例子的想法?



非常感谢,

Hi all,

I am look to create a dropdown menu on logged in username hover. Like on this(codeproject) site when you hover over your username it brings a dropdown menu.

similar example is the linkedin website ..

Please provide some ideas on how to implement this with examples if possible?

Many thanks,

推荐答案

嗨Spankyleo,



参见示例 [ ^ ]



基本上,设置所需的风格和行为主要是很多CSS样式。



干杯,

Edo
Hi Spankyleo,

See example[^]

Basically it''s mostly a lot of CSS styling to set your desired style and behavior.

Cheers,
Edo


在dynemicDrivie网站上使用Flex Level下拉菜单:



链接是



http://www.dynamicdrive.com/ dynamicindex1 / flexdropdown.htm [ ^ ]
use Flex Level Drop Down Menu at dynemicDrivie Site:

The link is

http://www.dynamicdrive.com/dynamicindex1/flexdropdown.htm[^]

请提供一些有关如何实现此内容的建议

可以有多种方法来实现。 AFAIK,这里是CP,它是CSS驱动的。为用户名定义悬停样式。在样式中,将dropdown div元素的display属性设置为display。



基础逻辑是默认隐藏的div。基于某些事件,您需要显示此div。这里,悬停是正在使用的事件。如果你不想要CSS方式,你可以为用户名定义onmouseover事件,然后在JavScript中显示所需的div。在mouseout上,将其隐藏起来。



例如,你自己发布了几个问题!现在,如果您遇到任何问题,请尝试并发布具体问题。
Please provide some ideas on how to implement this
There can be multiple ways to do it. AFAIK, here at CP, it''s CSS driven. Define a hover style for the username. In the style, set display property of the dropdown div element as to display.

Underlying logic is to have a div that is hidden by default. based on some event, you need to show this div. Here, hover is that event that is being used. If you don''t want CSS way, you can define onmouseover event for username and then in JavScript, show the needed div. On mouseout, hide it back.

Examples, you yourself posted couple of them in question! Now, try out and post specific issues if you face any.


这篇关于如何创建用户名悬停下拉菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆