且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

子菜单不保持打开

更新时间:2023-08-15 17:37:28

它与#content在#navigation之后的事实有关,它的z-index更高。如果你设置两个位置:相对,并将#navigation的z-index设置为比#content更高的值,它将如你所期望的那样工作。请参见 http://jsfiddle.net/tangibleJ/B4aDM/2/

It has to do with the fact the #content comes after #navigation and it's z-index is higher. If you set both position: relative and set the z-index of #navigation to a higher value than #content it'll work as you expect. See http://jsfiddle.net/tangibleJ/B4aDM/2/.