Jquery 滑块框

发布于 2024-09-14 13:51:09 字数 285 浏览 1 评论 0原文

不确定这是 JavaScript 问题还是可以用 CSS 解决。

我使用带有文本覆盖滑块的图像,但似乎在页面加载时滑块的起始位置存在一些问题。这是生动的示例,我希望滑块在加载时隐藏并在翻转时从下方显示。

http://www.warface.co.uk/clients/detail-shoppe/导演

非常感谢

Not sure if this is a javascript issue or can be solved with CSS.

Im using an image with a text overlay slider but seem to having some issues with where the slider starts on page load. This is the live example, I would like the slider to be hidden on load and appear from below on rollover.

http://www.warface.co.uk/clients/detail-shoppe/directors

Many thanks

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

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

发布评论

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

评论(2

茶色山野 2024-09-21 13:51:09

您只需将初始 top 值添加到 CSS 中,如下所示:

.boxcaption{
  top: 240px;     /* add this! */
  float: left;
  ....
 }

这将为您提供所需的初始效果,并且在悬停时它将在第一次悬停时向上滑动。

You can just add the initial top value to your CSS, like this:

.boxcaption{
  top: 240px;     /* add this! */
  float: left;
  ....
 }

This should give you the initial effect you want, and on hover it'll slide up on the first hover.

相权↑美人 2024-09-21 13:51:09

只需包含这一行来设置初始 css,以便两个 .cover div

$('.boxgrid.captionfull .cover').css('top', 240);

像这样“隐藏”

...
$(document).ready(function(){
    $('.boxgrid.captionfull .cover').css('top', 240);
    //Full Caption Sliding (Hidden to Visible)
...

Just include this line which sets the inital css so that the two .cover divs are "hidden"

$('.boxgrid.captionfull .cover').css('top', 240);

like this

...
$(document).ready(function(){
    $('.boxgrid.captionfull .cover').css('top', 240);
    //Full Caption Sliding (Hidden to Visible)
...
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文