Galleria 软件 - 无法从 CSS 中提取舞台高度
当我在 IE8 和 Firefox 6.0.2 中刷新包含 Galleria 图库的页面时,遇到错误 - 无法从 CSS 中提取舞台高度:跟踪高度 0px。我做了这些更改:
1)通过更改此标签到 html -
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 //EN"
2)添加了 height 属性
.galleria-stage {height: 467px;}
3)在 head 部分匹配了以下标签 -
link type="text/css" rel="stylesheet" href="galleria/themes/classic/galleria.classic.css"
script type="text/javascript" src="js/galleria-1.2.5.min.js"
script type="text/javascript" src="galleria/themes/classic/galleria.classic.min.js"
我仍然遇到此错误。请帮忙! (我已经删除了这篇文章中的小于和大于符号,但它们包含在我的代码中)。
谢谢,
里克·R。
I'm experiencing an error - Could not extract a stage height from the CSS: Traced height 0px - when I refresh a page with a Galleria gallery in both IE8 and Firefox 6.0.2. I've made these changes:
1) To the html by changing this tag -
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 //EN"
2) Added the height attribute to the
.galleria-stage {height: 467px;}
3) Matched the following tags in the head section -
link type="text/css" rel="stylesheet" href="galleria/themes/classic/galleria.classic.css"
script type="text/javascript" src="js/galleria-1.2.5.min.js"
script type="text/javascript" src="galleria/themes/classic/galleria.classic.min.js"
I continue to experience this error. Please help! (I've removed less than and greater than symbols in this posting but they are included in my code).
Thanks,
Rick R.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
根据脚本作者的说法,这个问题已在最新的测试版中得到修复: https: //github.com/aino/galleria/blob/master/src/galleria.js
According to the script author this problem has been fixed in the latest beta: https://github.com/aino/galleria/blob/master/src/galleria.js
我遇到了同样的问题,并将高度属性添加到 galleria.classic.css 并实现了“告诉我甘道夫在哪里”推荐的文件,我的错误消失了。我本来打算给他+1,但我的声誉还不够高;)
I was experiencing the same issue and added the height attribute to the galleria.classic.css as well as implemented the file that "Tell me Where is Gandalf" recommended and my error went away. I was going to +1 his but my reputation isn't high enough ;)
不酷的解决方案是在 Galleria 样式的末尾添加
它只是为了忽略错误消息
not cool solution is to add at the end on galleria styling
its just to ignore error message
实际上,诀窍是在页面中添加高度设置,并保留其余设置,如示例中所示
(至少对我来说 chrome 18.0.1025.168 m)
actually, the trick is to add the height setting in-page, and leave the rest of the settings like they are in the example
(at least for me in chrome 18.0.1025.168 m)
我在 1.2.5 版本中遇到了同样的问题,并通过将: 放置
在文档的最顶部来修复它。希望这对你有帮助还不算太晚。
I had the same problem with version 1.2.5 and fixed it by placing:
At the very top of the document. Hope this isn't to late to help you.
您可以在调用
galleria.run('#galleria');
之前设置元素的height
和width
。我遇到了同样的问题,这解决了它。
You may set
height
andwidth
of the element before you callgalleria.run('#galleria');
.I had the same problem and this fixed it.
那是一次多么改变思想的经历啊!对我来说,这取决于我阅读的安装指南。
这个给了我致命错误消息以及我在浏览解决方案时所有的尝试更改。
这个让我重新开始运行。我采用了以下 HTML 并更新了我的文件,使其看起来像带有 CSS 条目的此版本。首先它起作用了。
What a mind altering experience that was! For me, it came down to which install guide I read.
This one gave me the fatal error msg and all my trial changes as I surfed a resolution.
This one got me back up and running. I took the below HTML and updated my file to look like this version with CSS entries. It worked first go.
我通过打开 javascript 文件 galleria-1.2.7.js 并将 debug 设置为 false 解决了此问题。
25号线左右
I fixed this issue by opening the javascript file galleria-1.2.7.js and setting debug to false.
Around line 25