你可以把菜单的内容放在iFrame中啊

解决方案 »

  1.   

    了解一个z-index属性吧是什么意思?在我上面的代码中div的z-index属性明显比iframe要高一些啊。把菜单放在iframe中可以吗?那iframe怎么写到页面中?小弟是新手,还希望各位不吝赐教。谢谢!
      

  2.   

    最的这几天我也正在研究这种下拉菜单, 没有你这种问题呀:
    1.你在DIV里设置了position和z-index那么iframe就没有必要设置了,
    2.设置z-index大于0就不会被select等覆盖了.
      

  3.   

    To:梅花雪老大,我去掉iframe之后我的下拉菜单的确是被select挡住了。不是说select在页面上的层次比div要高一些吗?小弟不懂这玩意,还望老大研究完之后能赐教一二,谢谢!同时十分感谢楼上的各位,谢谢!
      

  4.   

    http://www.meizz.com/    下拉菜单
      

  5.   

    下文摘自M$ MSDN
    http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/zindex.aspResPositive z-index values are positioned above a negative (or lesser value) z-index. Two objects with the same z-index are stacked according to source order. A positive value positions the element above text that has no defined z-index, and a negative value positions it below. Set this parameter to null to remove the attribute.The zIndex property only applies to objects that have the position property set to relative or absolute.The property does not apply to windowed controls, such as select objects.As of Microsoft Internet Explorer 5.5, the iframe object is windowless and supports the zIndex property. In earlier versions of Internet Explorer, the iframe object is windowed and, like all windowed controls, ignores the zIndex property. If you maintain Web pages that were designed for earlier versions of Internet Explorer that do not support the zIndex property, you might want to redesign the pages, especially if the pages contain iframe objects that are stacked on top of windowed controls, such as select objects. You can use the visibility attribute to hide windowed controls that you want an iframe object to overlap. You can also position windowed controls so that iframe objects do not overlap them.Input from pointing devices, such as the mouse, does not penetrate through overlapping elements even if the elements are not visible. This is also true for positioned elements with a negative z-index unless: The parent is a scrolling container (that is, its overflow property is set to auto or scroll).
    The parent is positioned (that is, its position property is set to absolute or relative).你还是从其他方法考虑吧?例如在js加上对select的visible/hidden