如何在 Galleria 全屏幻灯片上添加文本?

发布于 2024-10-23 15:41:29 字数 1855 浏览 15 评论 0原文

我正在使用 Galleria 全屏幻灯片 http://galleria.aino.se/themes/fullscreen/ 我正在尝试在几张幻灯片的中间添加文本和超文本。

这是我的 html 代码:

<head>
    <meta charset="utf-8">
    <title> welcome to my website</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script src="galleria/galleria-1.2.2.min.js"></script>
   <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
</head>

<body>
<div id="galleria">
  <a href="images/logo.jpg"><img title="Project Abstract" alt="brief dics about project abstract" src="images/logo.thumb.jpg"></a>    
  <a href="images/image1.jpg"><img title="slide 1" alt="brief disc about slide 1" src="images/image1.thumb.jpg"></a> 
  <a href="images/image2.jpg"><img title="slide 2" alt="brief disc about slide 2" src="images/image2.thumb.jpg"></a> 
  <a href="images/image3.jpg"><img title="slide 3" alt="brief disc about slide 3" src="images/image3.thumb.jpg"></a>  
  <a href="images/image4.jpg"><img title="slide 4" alt="brief disc about slide 4" src="images/image4.thumb.jpg"></a>
</div>

<script>
Galleria.loadTheme('galleria/themes/fullscreen/galleria.fullscreen.min.js');
$('#galleria').galleria({
transition: 'fade',
show: 19
});
</script>

</body>

我想要下面这个风格化的 div 标签来覆盖幻灯片:

.textbox {
position: relative;
height: 600px;
width: 900px;
top: 180px;
margin-left:auto;
margin-right:auto;
font-family: arial, sans-serif;
font-size: 12px;
line-height: 1.7;
text-align: justify;
}

不幸的是,我对网络世界还是个新手,如果有人能引导我完成如何在幻灯片顶部应用文本的步骤,我将非常感激。画廊幻灯片。

提前致谢。

I'm using Galleria fullscreen slide show http://galleria.aino.se/themes/fullscreen/ and I'm trying to add text and hypertext in the middle of couple of slides.

This is my html code:

<head>
    <meta charset="utf-8">
    <title> welcome to my website</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script src="galleria/galleria-1.2.2.min.js"></script>
   <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
</head>

<body>
<div id="galleria">
  <a href="images/logo.jpg"><img title="Project Abstract" alt="brief dics about project abstract" src="images/logo.thumb.jpg"></a>    
  <a href="images/image1.jpg"><img title="slide 1" alt="brief disc about slide 1" src="images/image1.thumb.jpg"></a> 
  <a href="images/image2.jpg"><img title="slide 2" alt="brief disc about slide 2" src="images/image2.thumb.jpg"></a> 
  <a href="images/image3.jpg"><img title="slide 3" alt="brief disc about slide 3" src="images/image3.thumb.jpg"></a>  
  <a href="images/image4.jpg"><img title="slide 4" alt="brief disc about slide 4" src="images/image4.thumb.jpg"></a>
</div>

<script>
Galleria.loadTheme('galleria/themes/fullscreen/galleria.fullscreen.min.js');
$('#galleria').galleria({
transition: 'fade',
show: 19
});
</script>

</body>

I want this stylized div tag below to overlay the slides:

.textbox {
position: relative;
height: 600px;
width: 900px;
top: 180px;
margin-left:auto;
margin-right:auto;
font-family: arial, sans-serif;
font-size: 12px;
line-height: 1.7;
text-align: justify;
}

Unfortunately, I'm still new to the web world and would really appreciate if someone can walk me through the steps to how to apply text on top of the galleria slides.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

失退 2024-10-30 15:41:29

我不明白 - 您想使用带有 .textbox 类的元素吗?您只需在 HTML 中创建该元素即可 (

My text here

),然后就可以开始了。我唯一建议的是将 CSS 属性 z-index 添加到该 .textbox 类中。

I'm not understanding - you want to use an element with the class .textbox on it? You can just create the element in your HTML (<div class="textbox">My text here</div>) and you are good to go. Only thing I would recommend is adding the CSS property z-index to that .textbox class.

猫九 2024-10-30 15:41:29

只需将文本框放在源代码中#galleria div 后面即可。

您还需要将 z-index:10001 添加到文本框,因为全屏函数将 10000 的 zIndex 应用于容器。您可能还想添加 position:absolute 而不是 relative

Just put the textbox after the #galleria div in the source code.

You’ll need to add z-index:10001 to the textbox as well, since the fullscreen function applies a zIndex of 10000 to the container. You might also want to add position:absolute instead of relative.

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