我可以创建内容高度可变的尾部滑块导航吗?
如今,大多数人都非常了解 Coda Slider 效果,但即使通过谷歌搜索并在这里进行搜索,我也找不到答案。
问题 如何创建一个使用水平滑动/滚动的 Coda Slider 样式导航,但在滑动动画期间将其高度调整为内容所需的高度?
例如,第一张“幻灯片”中只有一张图片(宽度为 400 像素,高度为 300 像素),但下一张幻灯片包含大量信息,包括图片、文本和视频内容,总计宽度为 400 像素,高度为 800 像素。 现在,首先创建一个 800 像素高的容器只是浪费幻灯片 1 的空间,因此我需要根据单个幻灯片内容所需的高度动态更改幻灯片容器的高度。
这可能吗? 也许那里有一个教程,你们中的一个可以向我指出这一点。
在技术方面,我对xHTML和CSS非常适应,但对jQuery和PHP只是业余爱好者。 虽然这不应该限制您的答案,但请在解释时牢记这一点。
非常感谢您的阅读, 我期待您的想法、解决方案和一般意见。
詹尼斯
Most people know the Coda Slider effect well these days but even with googling and doing a search here I could not find my answer.
Question How can I create a Coda Slider style navigation that uses horizontal sliding/scrolling but adaptes its height during the sliding animation to the height needed for the content?
For instance, the first 'slide' only has a picture in it (400px width, 300px height) but the next slide has lots of info including pictures, text and video content totalling at 400px width and 800px in height.
Now, creating a 800px high container to begin with is just a waste of space for slide 1 so i need to dynamically based upon the height needed by the content of the individual slide change the height of the slide's container.
Is this possible?
Maybe there is a tutorial somewhere out there and one of yous could point me towards that.
In terms of technology I am quite adapt at xHTML and CSS but only an amateur at jQuery and PHP.
While this should not be a restriction to your answer, please keep it in mind when explaining things.
Thank you very much for reading,
I look forward to your ideas, solution and general input.
Jannis
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最近推出了自己的。 这是(希望)一个有用的起点。
这是我的“下一步按钮”的代码。
要让它调整高度,您只需向动画的 JSON 参数添加高度即可。 当然
,您需要一些 JavaScript 来计算出下一个高度应该是多少!
I recently rolled my own. Here is (hopefully) a useful starting point.
Here is the code for my 'next button'.
To get it to adjust it's height, you'd simply add a height to the animate's JSON argument. Such as
And of course, you'll need some JavaScript to work out what the next height should be!