简体   繁体   English

Javascript?/ CSS - 下拉菜单

[英]Javascript?/CSS - Drop Down Menu

I was looking for some kind of code similar to Gmail's Chat on Gmail's Page: a drop-down menu that pushes everything else that is down to the chat, but for some reason I couldn't see the page's source and I haven't found the same code in any other page. 我正在寻找类似于Gmail在Gmail页面上聊天的代码:一个下拉菜单,可以推送其他所有内容,但由于某种原因,我看不到页面的来源而我找不到任何其他页面中的相同代码。 Does anybody know some page with similar code? 有人知道一些类似代码的页面吗?

Regards! 问候!

You can have a which height is set to 0px or auto to make it expand/collapse. 您可以将高度设置为0px或自动以使其展开/折叠。

You can also give a sliding effect by gradually increasing/decreasing the height of the div. 您还可以通过逐渐增加/减少div的高度来提供滑动效果。

As long as it's not positioned absolute, it will push the content below. 只要它不是绝对的,它将推动下面的内容。

You can use jQuery's native slideDown function to show hidden elements that will push content down below them, depending on your slideDown element's CSS positioning and float. 您可以使用jQuery的原生slideDown函数来显示隐藏的元素,这些元素会将内容推到它们下面,具体取决于您的slideDown元素的CSS定位和浮动。

http://api.jquery.com/slideDown/ http://api.jquery.com/slideDown/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM