显示下拉菜单的最佳方式是什么? [英] What is the best way to display a drop down menu?

查看:88
本文介绍了显示下拉菜单的最佳方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显示下拉菜单的最佳方法是什么?为了最佳实践。

请记住:

-Accessabilty,
使用javascript关闭
$ b可见$ b屏幕阅读器
--backwords capatabilty,
在IE6中可见
- 跨浏览器



我问这是因为我最近一直在一些网站上,只有下拉菜单的CSS没有显示在IE6下拉菜单的网站



显示下拉列表,如果JavaScript是关闭正确的方法来做到这一点?

解决方案

标准的javascriptless下拉菜单叫做suckerfish或者suckerfish dropdowns的儿子: http://htmldog.com/articles/suckerfish/dropdowns/

然而,在IE6中,您会注意到它们会使用一些js来模仿悬停。这很好 - 只要你悬停的第一个链接,触发下拉,是一个真正的链接!将该链接转到他们可以导航到隐藏在菜单中的页面的页面。如果没有别的,只需复制它们缺失的子菜单,并使页面内容可以正常工作。



Voila,可访问性。


What is the best way to display a drop down menu? for the sake of best practices.
keeping in mind:

-Accessabilty , Its viewable with javascript off
screen readers -backwords capatabilty , viewable in IE6 -cross browser

I'm asking this because I've recently been working on some site that have css only drop down menu's that do not display the drop downs in IE6

Is displaying the drop down as a list if javascript is off the right way to do it?

解决方案

The standard for javascriptless dropdown are called suckerfish or son of suckerfish dropdowns: http://htmldog.com/articles/suckerfish/dropdowns/

In IE6, though, as you'll notice, they use a little bit of js to mimic hover. That's fine--so long as the first link you hover over, that triggers the dropdown, is a real link! Have that link go to a page where they can navigate to those pages hidden in the menu. If nothing else, simply copying the submenu they're missing and making that the content of the page will work.

Voila, accessibility.

这篇关于显示下拉菜单的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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