Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在以下几行中(来自超级鱼):
ul.sf-navbar .current ul ul { top: -999em; }
top: -999em有什么特殊含义吗?为什么 top 设置为在浏览器中不可见的值?
top: -999em
这样子导航就会“隐藏”,直到它的父项悬停在上面,然后才会显示出来。
其目的仅仅是防止任何第二层和更高级别的菜单在显示第一层菜单时自动出现。
我认为这是一个下拉菜单,它设置在可见范围之外,top: -999em;以便可以通过 javascript/css 更改它的出现。
top: -999em;