高度在某些时候无法正确渲染
第一次加载并访问此页面上的一些幻灯片 http://www.blythestoves.co.uk /new 未渲染正确的高度。一些信息被切断。转到幻灯片 2 (Ecomaster BB1),在气流刻度盘的图像下方应该有一些有关保修的信息。该页面不会呈现最后一个文本块。
这是奇怪的部分。如果您刷新页面,则不会发生任何事情,但如果您转到地址栏并单击此处,然后再次按回车键,则页面将正确加载,高度全部正确。
我真的不明白并且已经在这上面花了太多时间。任何帮助都会非常好。
谢谢。
The first time you load and visit some of the slides on this page http://www.blythestoves.co.uk/new the correct height doesn't render. Some information is cut off. Go to slide 2 (Ecomaster BB1) and under the images of the air flow dials there should be some info on the warranty. The page doesn't render that last text block.
Here is the weird part. If you refresh the page nothing happens but if you go to the address bar and click in there and push return again the page will load correctly with the height all correct.
I really don't understand and have spent too much time on this already. Any help would be really great.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
主要问题是 webkit 浏览器在图像开始加载之前触发文档就绪事件,因此尚未获得图像尺寸。因此,如果您在 css 或 inline: 中包含图像尺寸,
则滑块高度将适当调整大小。
此外,滑块初始化中的宽度选项已被弃用,因此您只能使用 css 设置滑块尺寸。所以你可以删除这一行,因为它不执行任何操作:
The main issue is that webkit browsers fire off the document ready event before the images start loading and thus the image dimensions have not been obtained. So if you include the image dimensions in the css or inline:
then the slider height will be appropriately sized.
Additionally, the width option in the slider initialization has been deprecated, so you can only set the slider dimensions using css. So you can remove this line, because it doesn't do anything:
如果没有小提琴隔离,我无法确定,但我猜它不会调整大小,因为您明确告诉它不要使用
resizeContents : false
:将其从那里取出,它可能会起作用。如果没有,请给我们安排一个小提琴;)
Without isolating in a fiddle I can't tell for sure, but I'd guess it's not resizing because you explicitly told it not to with
resizeContents : false
:Get that out of there and it may work. If not, set us up a fiddle ;)
我可以在 Firefox 和 Chrome 上使用吗?这可能是CSS溢出问题,因为它只出现在IE中。
安德鲁
Works for me on firefox and chrome? It might be an overflow css problem is it only appears in IE.
Andrew