将 div 浮动在手风琴下方的页面上
从下图中您可以看到我有一个“快速提示”div。例如,假设最外面的 div 被称为: id = "TipsDiv" 您可以看到它位于手风琴下方。我希望它位于手风琴下方。然而,当用户向下滚动时,div 永远不应该超过 (0,0)。当用户向后滚动时,它应该像图片中那样。
如果我没有表达清楚,请告诉我,我会尽力解释得更好。
谢谢!
From the image below you can see that I have a "Quick Tips" div. For examples sake lets say that the outermost div is called: id = "TipsDiv" You can see that it is below the accordion. I want it to stay below the accordion. However when the user scrolls down the div should never go above (0,0). And when the user scrolls back up it should be like it is in the picture.
If i didn't make my self clear please let me know and i'll try to explain better.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该能够使用我为另一个问题创建的示例,并进行一些修改来处理手风琴。基本上,您需要将 250 替换为计算出的手风琴高度。
http://jsfiddle.net/b43hj/
You should be able to use something like this example I created for another question, with some modification to handle the accordion. Basically you will need to replace the 250 with the calculated height of the accordion.
http://jsfiddle.net/b43hj/