无法让 rCarousel 工作(导航宽度和自动滚动)
我做错了什么,但我找不到什么...... 。 不知怎的,我无法让 rCarousel 工作(顶部写着“vrienden van het koksgilde”)。
我真的不知道我做错了什么。 我按照本页上的说明进行操作: http://ryrych.github.com/rcarousel/
我仔细检查了如果我的脚本和 CSS 链接正确的话,它们就是正确的。由于某种原因,它的导航不起作用,也不会自动滚动。我也无法设置旋转木马的宽度以适应盒子。
当我查看 firebug 时,我发现元素具有内联样式,我认为这应该与它有关?
一些帮助将不胜感激。
I am doing something wrong, but i cannot find what....
Somehow i cannot get the rCarousel to work (top part which says "vrienden van het koksgilde").
I dont really know what i am doing wrong.
I followedthe instructions on this page: http://ryrych.github.com/rcarousel/
I double checked if my links to the scripts and css are right and they are. For some reason the nav of it wont work, neither will it autoscroll. Also i cannot set the width of the carousel to fit the box.
When i am looking with firebug i see that the elements get inline styles, that should have something to do with it i think?
Some help would be greatly apreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前,轮播中只有 3 个项目,并且它们都是可见的 - 因此,当您单击上一个/下一个时,无需执行任何操作;)
CSS 中的第 33 行是它不适合框的问题:
它设置了所有 div 的宽度每个 ID 容器为 100%,即 300px,加上指定的填充 = 324px,这就是它爆发的原因。 H1 也是如此,只是它们没有明显破损,但它们正在从容器中渗出。
它通过 div 进行级联,您想要保持填充的宽度是 276px;
将覆盖样式并使其适合,但是我建议您查看宽度发生的情况并使它们更具体一些。
例如
,所以只是 #topboxes 中的直接子 div 并删除标题的宽度:
希望这是有道理的!
Currently you only have 3 items in the carousel and they are all visible - therefore there is nothing to do when you click previous/next ;)
Line 33 in your css is the issue with it not fitting the box:
Its setting all div's width within each ID'd container to 100%, which is 300px, add to that the padding specified = 324px, which is why its breaking out. Same goes for your H1's just that they are not visibly broken however they are bleeding out of there containers.
Its cascading through the divs, the width you want with that padding maintained is 276px;
Will override the style and make it fit, however I would suggest you look at what's happening with the widths and make them a little more specific.
e.g
So just the immediate child divs within the #topboxes and remove the width form the headings:
Hope that makes sense!