Galleria 软件 - 无法从 CSS 中提取舞台高度

发布于 2024-12-07 15:49:33 字数 667 浏览 2 评论 0原文

当我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

凉宸 2024-12-14 15:49:33

根据脚本作者的说法,这个问题已在最新的测试版中得到修复: 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

早茶月光 2024-12-14 15:49:33

我遇到了同样的问题,并将高度属性添加到 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 ;)

被你宠の有点坏 2024-12-14 15:49:33

不酷的解决方案是在 Galleria 样式的末尾添加

.galleria-errors{display: none;}

它只是为了忽略错误消息

not cool solution is to add at the end on galleria styling

.galleria-errors{display: none;}

its just to ignore error message

蓝梦月影 2024-12-14 15:49:33

实际上,诀窍是在页面中添加高度设置,并保留其余设置,如示例中所示
(至少对我来说 chrome 18.0.1025.168 m)

<!doctype html>
<head>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
        <script src="galleria/galleria-1.2.7.min.js"></script>
        <style>
            #galleria{height:467px}
        </style>
    </head>
    <body>
        <div id="galleria">
            <img src="photos/photo1.jpg">
            <img src="photos/photo2.jpg">
            <img src="photos/photo3.jpg">
        </div>
        <script>
            Galleria.loadTheme('galleria/themes/classic/galleria.classic.min.js');
            Galleria.run('#galleria');
        </script>
    </body>
</html>

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)

<!doctype html>
<head>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
        <script src="galleria/galleria-1.2.7.min.js"></script>
        <style>
            #galleria{height:467px}
        </style>
    </head>
    <body>
        <div id="galleria">
            <img src="photos/photo1.jpg">
            <img src="photos/photo2.jpg">
            <img src="photos/photo3.jpg">
        </div>
        <script>
            Galleria.loadTheme('galleria/themes/classic/galleria.classic.min.js');
            Galleria.run('#galleria');
        </script>
    </body>
</html>
妥活 2024-12-14 15:49:33

我在 1.2.5 版本中遇到了同样的问题,并通过将: 放置

<!doctype html>
<head>

在文档的最顶部来修复它。希望这对你有帮助还不算太晚。

I had the same problem with version 1.2.5 and fixed it by placing:

<!doctype html>
<head>

At the very top of the document. Hope this isn't to late to help you.

惟欲睡 2024-12-14 15:49:33

您可以在调用 galleria.run('#galleria'); 之前设置元素的 heightwidth
我遇到了同样的问题,这解决了它。

You may set height and width of the element before you call galleria.run('#galleria');.
I had the same problem and this fixed it.

热风软妹 2024-12-14 15:49:33

那是一次多么改变思想的经历啊!对我来说,这取决于我阅读的安装指南。

这个给了我致命错误消息以及我在浏览解决方案时所有的尝试更改。

这个让我重新开始运行。我采用了以下 HTML 并更新了我的文件,使其看起来像带有 CSS 条目的此版本。首先它起作用了。

<!doctype html>
<html>
    <head>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
        <script src="galleria/galleria-1.2.7.min.js"></script>
        <style>
            #galleria{ width: 700px; height: 400px; background: #000; }
        </style>
    </head>
    <body>
        <div id="galleria">
            <img src="photo1.jpg">
            <img src="photo2.jpg">
            <img src="photo3.jpg">
        </div>
        <script>
            Galleria.loadTheme('galleria/themes/classic/galleria.classic.min.js');
            Galleria.run("#galleria");
        </script>
    </body>
</html>

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.

<!doctype html>
<html>
    <head>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
        <script src="galleria/galleria-1.2.7.min.js"></script>
        <style>
            #galleria{ width: 700px; height: 400px; background: #000; }
        </style>
    </head>
    <body>
        <div id="galleria">
            <img src="photo1.jpg">
            <img src="photo2.jpg">
            <img src="photo3.jpg">
        </div>
        <script>
            Galleria.loadTheme('galleria/themes/classic/galleria.classic.min.js');
            Galleria.run("#galleria");
        </script>
    </body>
</html>
(り薆情海 2024-12-14 15:49:33

我通过打开 javascript 文件 galleria-1.2.7.js 并将 debug 设置为 false 解决了此问题。

25号线左右

VERSION = 1.27,
DEBUG = false,
TIMEOUT = 50000,

I fixed this issue by opening the javascript file galleria-1.2.7.js and setting debug to false.

Around line 25

VERSION = 1.27,
DEBUG = false,
TIMEOUT = 50000,
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文