丰富的 JavaScript DHTML 菜单

发布于 2024-11-29 15:24:24 字数 284 浏览 1 评论 0原文

有人可以建议一个 JS 菜单脚本,它能够支持菜单,例如这里制作的菜单 http://www.brightstarr.com/US/Pages/Default.aspx

我一直在网上搜索,但无法完全正确地表达它,所以我总是最终出现在 Superfish 或其他一些简单的下拉菜单上?

我需要的是对大菜单的支持,将其分成具有可选图像支持的部分(每个菜单链接的图像)。

Can someone suggest a JS menu script that would be able to support menus such as those that are made here http://www.brightstarr.com/US/Pages/Default.aspx ?

I've been searching the web but can't quite phrase it correctly so I always end up either on Superfish or some other plain dropdown menu?

What I need is support for big menus, broken apart in sections with optional images support (image per menu link).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

请恋爱 2024-12-06 15:24:24

该特定页面的菜单似乎根本没有使用 JS - 只是利用 :hover 伪类的 CSS。在此处找到了教程。最重要的是,您编写下拉菜单所需的所有标记,使用 CSS 样式对其进行调味(和位置!),最后将 :hover 放在样式表中以制作子菜单当您希望它们出现时出现。

The particular page doesn't seem to use JS for their menu at all - just CSS leveraging the :hover pseudoclass. Found a tutorial here. The bottom line is that you write all the markup your dropdows require, season them with CSS styles to taste (and position!), and finally put the :hover in place in your stylesheet to just make the submenus appear when you want them to.

悲念泪 2024-12-06 15:24:24

Soh Tanaka 的超级菜单 就是一个典型的例子设置这种风格的菜单。我什至可以说这是大型菜单脚本的黄金标准。构建完教程后,您应该可以轻松地在每个相关区域的 div 内执行您想要的任何操作。

使用预先完成的解决方案和这样的教程的最大好处是,您不仅可以学习,而且还经过了良好的测试和修改。

如果上面的示例对

  • 元素有点过于严格,您可能会 尝试 SitePoint 的本教程
  • Soh Tanaka's Mega Menu is the classic example of setting up this style of menu. I'd go so far as to say it's the gold standard for mega menu scripts. After building the tutorial, it should be easy to do anything you want inside the divs for each relevant area.

    The best part about using a pre-done solution with a tutorial like this is that not only do you get to learn, but it's also been well tested and revised.

    If the above example is a little too strict with <li> elements, you might try this tutorial from SitePoint

    意中人 2024-12-06 15:24:24

    我只想搜索您最喜欢的 javascript 框架的插件。如果你搜索“jquery drop down menu plugin”,可能有大约 1000 个。大尺寸和添加图像在我使用过的图像中是相当标准的,因为它们只是 div。我不知道您是否习惯使用 jquery,但我确信也有适用于所有其他大型框架的插件。

    I would just search for plugins for your favorite javascript framework. There are probably about 1000 if you search "jquery drop down menu plugin". The big sizes and adding of images is pretty standard in the ones I've used as well since they are just divs. I don't know if you are used to working with jquery but I am sure there are plugins for all the other big frameworks out there as well.

    谁许谁一生繁华 2024-12-06 15:24:24

    我为 BrightStarr 网站编写了菜单。它根本不使用 JS,在决定这个之前我尝试了很多技术,我选择这个的原因很简单,它在移动设备上的性能比我遇到的任何其他 JS 解决方案都要好。

    I wrote the menu for the BrightStarr Site. It doesn't use JS at all, I tried lots of techniques before deciding on this and I choose this for the simple reason that it performs much better on mobile devices than any other JS solution I've come across.

    ~没有更多了~
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文