定位幻灯片标题

发布于 2024-12-25 12:21:55 字数 557 浏览 4 评论 0原文

我正在使用 slidejs 并尝试找出如何将幻灯片标题放置在图像下方。我不知道该怎么做。我对 css 文件处于试错模式,但没有成功。下面是我的CSS。

/*
       Caption
*/
.caption {
  z-index:500;
  position:absolute;  /* remove this and caption dissapears. why? where does it go? */
  left:-39px;
  bottom:-10px;
  font-size: 1.1em;
  left:0;
  width:440px;
  text-shadow:none;
}

.caption p {
  bottom:20px;
  z-index:500;
  margin-bottom: 3px;
  margin-top: 0px;
}
  1. 有人知道如何将标题放置在页面上的其他位置吗?

  2. 我发现的最接近的提示是

I am using slidejs and trying to figure out how to position the slidejs caption below the image. I can't figure out how to do this. I'm in trial-and-error mode with the css file with no luck. below is my css.

/*
       Caption
*/
.caption {
  z-index:500;
  position:absolute;  /* remove this and caption dissapears. why? where does it go? */
  left:-39px;
  bottom:-10px;
  font-size: 1.1em;
  left:0;
  width:440px;
  text-shadow:none;
}

.caption p {
  bottom:20px;
  z-index:500;
  margin-bottom: 3px;
  margin-top: 0px;
}
  1. Does anyone know how to do position the caption somewhere else on the page?

  2. The closest hint I found is here. But I'm a javascript and css beginner and I really don't get it. Can someone explain what they are saying?

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

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

发布评论

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

评论(1

倒数 2025-01-01 12:21:55

修改 .captionleftbottom 属性:

.caption {
  z-index:500;
  position:absolute;  /* remove this and caption dissapears. why? where does it go? */

  left:-39px;         /* horizontal positioning relative to the parent nearest
                         explicitly positioned elements left border */
  bottom:-10px;       /* vertical positioning relative to the parent nearest
                         explicitly positioned element bottom border */

  font-size: 1.1em;
  width:440px;
  text-shadow:none;
}

Also 删除多余的 <代码>左定义...

Modify the left and bottom properties of .caption:

.caption {
  z-index:500;
  position:absolute;  /* remove this and caption dissapears. why? where does it go? */

  left:-39px;         /* horizontal positioning relative to the parent nearest
                         explicitly positioned elements left border */
  bottom:-10px;       /* vertical positioning relative to the parent nearest
                         explicitly positioned element bottom border */

  font-size: 1.1em;
  width:440px;
  text-shadow:none;
}

Also remove the extra left definition...

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