简体   繁体   English

折叠div时手风琴菜单CSS3,HTML5问题

[英]Accordion Menu CSS3, HTML5 problems with collapsing divs

I have a problem with a accordion menu using HTML5 and CSS3. 使用HTML5和CSS3的手风琴菜单出现问题。 The accordion functions fine and has nice easing and transition. 手风琴功能良好,并具有良好的缓和和过渡效果。 My problem is that I have alot of content for each content div and I need to use overflow-y to have the content scroll. 我的问题是每个内容div都有很多内容,我需要使用溢出-y来使内容滚动。 If you scroll the content, then want to jump to another item...the div that you were just in collapses (as it should) but it doesn't revert back to the hyperlinked menu item, it shows the scrolled content instead. 如果滚动内容,则想跳到另一项...您刚才所在的div会折叠(应该如此),但是它不会恢复为超链接的菜单项,而是显示滚动的内容。

I wanted to see if there are any suggestions on making this more navigational friendly when someone jumps to another item. 我想看看当有人跳到另一个项目时是否有任何建议使它对导航更加友好。

Here is an example. 这是一个例子。 http://www.toolboxwebdesign.com/css3.html http://www.toolboxwebdesign.com/css3.html

Thank you in advance for any help! 预先感谢您的任何帮助!

I would put a div around the content of the accordion, not including the title, and put your overflow-y on that div. 我会在手风琴的内容周围放置一个div,不包括标题,然后在该div上放置上溢Y。 That way the title will always be at the top and not scroll with the content. 这样,标题将始终位于顶部,而不随内容滚动。

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

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