css实现联动菜单隐藏功能
While I was creating a Woot Checker for myself and you all, I was scanning through the page source code and saw something I had never seen before. I frequently browse the source code of the "big" websites but had never stumbled upon a hidden accessibility message.
当我为自己和所有人创建Woot Checker时,我正在浏览页面源代码,并且看到了以前从未见过的东西。 我经常浏览“大型”网站的源代码,但从未偶然发现隐藏的可访问性消息。
Why a hidden accessibility message? Because a hidden accessibility message is shown to the visually-impaired user and no one else. This message also shows your visually-impaired user that you care about their browsing experience. This easy additional can gain you the respect of your users.
为什么会有隐藏的可访问性消息? 因为向视障用户显示了一条隐藏的可访问性消息,但没有其他人显示。 此消息还会向您的视障用户表明您在乎他们的浏览体验。 这个简单的附加功能可以赢得用户的尊重。
XHTML代码 (The XHTML Code)
Welcome to the David Walsh Blog! This website was created to reach every audience possible.Please contact me at david@davidwalsh.name to let me know if I can do anything to furtherimprove your experience on this website.
CSS代码 (The CSS Code)
.accessibility { position: absolute; left: -9999px; font-size: small; }
Remember to place the paragraph at the top of your page's XHTML code!
请记住,将段落放在页面的XHTML代码的顶部!
翻译自:
css实现联动菜单隐藏功能