jscrollpane inside colorbox - iframe 底部被切断?
我正在使用 colorbox 打开一个 iframe,在其中调用 jscrollpane 以允许滚动。它可以工作,但在某些情况下(不是全部,看不到图案)下部可能 100px 左右被切断。此外,我无法让滚动条出现在 ipad 上。
有什么想法吗? http://www.ainonline.com/newsmakers/2011
单击时间线中的链接即可查看我的意思是。
I'm using colorbox to open an iframe, inside which i'm calling jscrollpane to allow scrolling. It works, but in some cases (not all, can't see a pattern) the lower maybe 100px or so are cut off. Further, I can't get scrollbars to appear on the ipad.
Any ideas?
http://www.ainonline.com/newsmakers/2011
Click on links in the timeline to see what I mean.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好吧,我看到的模式是最后一个文本块有时周围有段落标记,有时没有,这恰好与文本是否完全显示一致(与
...
)或某些文本保持隐藏(没有
...
< /代码>)。
不会显示最后一段文本:
将显示最后一段文本:
如果这可以解决该问题,请告诉我。
对于问题的另一部分(实际上应该在单独的问题中提出),iPad 不在网站上使用滚动条。它使用手势。不过,不用担心——该网站运行良好。
Well, the pattern I am seeing is that the last block of text sometimes has a paragraph markup around it, and sometimes not, which happens to coincide with whether or not the text is shown entirely (with
<p>...</p>
) or some of the text stays hidden (without<p>...</p>
).Will not show the last bit of text:
Will show the last bit of text:
Let me know if this solves that problem.
For the other part of the question (which really should be asked in a separate question), the iPad does not use scrollbars on websites. It uses gestures. Don't worry about it, though -- the site works great.
在通过 iframe 包含的每个页面上,您必须确保明确声明正文的边距,如下所示:
如果您不这样做,浏览器将使用它的默认设置,这意味着不同的浏览器也会产生不同的结果。
您应该查看: normalize.css
这是一个设计的样式表将所有浏览器重置为相同的标准样式规则。
On every page included via iframe you must ensure you explicitly state the margin of the body like so:
If you don't do this the browser will use it's default settings and this means different results from different browsers also.
You should check out: normalize.css
It is a stylesheet designed to reset all browsers to the same standard styling rules.
这里,您正在加载的页面在正文(用户代理样式表)上有 8 像素的边距,这导致页面有点偏离右侧和底部。那么看起来您丢失了部分页面。
放置边距:0px;在 body 元素上,例如:
Here the pages you are loading have a 8px margin on the body (user agent stylesheet), which results the pages are a bit off to the right and bottom. Then it looks like you are missing parts of the pages.
Put margin: 0px; on the body element like:
我有类似的问题......这是我的解决方案
I had a similar problem ... This was my solution