任何滑块(几个问题)

发布于 2024-10-14 22:13:18 字数 450 浏览 3 评论 0原文

我遇到了几个问题,我已经花了几个小时来解决,显然我真的需要帮助。

我使用 everythingslider 来播放内容幻灯片。您可以在这里找到它: http://ontwikkelomgeving.wijzijnblits.nl/fobservices/slider

现在问题:

  1. 过渡时有闪烁。 (最大的问题)
  2. 当我单击按钮时,您看不到按钮何时处于活动状态(它应该将背景img设置为顶部)
  3. ,它显示活动状态,但是一旦我将其悬停,它就消失了。另外,如果我单击另一个按钮并且不将鼠标悬停在第一个按钮上,那么我会得到 2 个活动状态。

有人可以帮助我解决这两个问题吗? 提前谢谢大家!!

I got several problems that i already spent hours on and obviously i really need help.

I use anythingslider for a content slideshow. You can find it here: http://ontwikkelomgeving.wijzijnblits.nl/fobservices/slider

Now the problems:

  1. there is a flickering when there is a transition. (biggest problem)
  2. you can't see when a button is active (it should set the background img to top)
  3. when i click a button, it shows the active state, but once i hover it it is gone. Also, if i click another button and i dont hover the first one, then i get 2 active states.

Can somebody help me with either of these problems?
Thanks a bunch in advance!!

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

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

发布评论

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

评论(2

梦幻之岛 2024-10-21 22:13:18

可能不是最好的答案。

但也许尝试这个滑块会更快,因为我记得很容易使用并快速实施。

Probably not the best answer.

But maybe it will be faster to try this slider, as I remember it easy to use and fast to implement.

-柠檬树下少年和吉他 2024-10-21 22:13:18

我没有看到你提到的闪烁问题,但活动幻灯片导航是因为CSS的问题。

在CSS中,所有颜色/背景设置都被分离出来并放在顶部,因此这一点CSS被定义了多次。这是完整的、更新的 everythingslider.css 文件:

/*
    AnythingSlider v1.4.1+ Default (base) theme

    By Chris Coyier: http://css-tricks.com
    with major improvements by Doug Neiner: http://pixelgraphics.us/
    based on work by Remy Sharp: http://jqueryfordesigners.com/
*/

/******* SET DEFAULT DIMENSIONS HERE ********/
#sliderholder {
    background-image: url(../images/bg-slider.jpg);
    width: 533px;
    height: 270px;
    padding-left: 14px;
    padding-top: 14px;
}
div.anythingSlider {
    width: 519px;
    height: 208px;

}

/****** SET COLORS HERE *******/
/* Default State */
div.anythingSlider .thumbNav a {
    background: url(../images/thenav.png) center bottom;
    color: #fff;
}

div.anythingSlider .start-stop {
    background-color: #ff000;
    color: #fff;
}
div.anythingSlider .start-stop.playing {
    background-color: #800;
}
div.anythingSlider .start-stop:hover, div.anythingSlider .start-stop.hover {
    color: #ddd;
}

/* Active State */
div.anythingSlider .start-stop {
    background-color: #080;
    color: #fff;
}
div.anythingSlider .start-stop.playing {
    background-color: #d00;
}
div.anythingSlider .start-stop:hover, div.anythingSlider .start-stop.hover {
    color: #fff;
}

/**** DO NOT CHANGE BELOW THIS LINE ****/
/* anythingSlider viewport window */
div.anythingSlider .anythingWindow {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
}
/* wrapper: 45px right & left padding for the arrows, 28px @ bottom for navigation */
div.anythingSlider {
    position: relative;
    padding-bottom: 35px;
}
/* anythingSlider base UL */
ul.anythingBase {
    background: transparent;
    list-style: none;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
}
ul.anythingBase li.panel {
    background: transparent;
    display: block;
    float: left;
    padding: 0;
    margin: 0;
}

/* Navigation Links */
div.anythingSlider .anythingControls { outline: 0; }
div.anythingSlider .thumbNav { margin: 0; }
div.anythingSlider .thumbNav li { display: inline; }
div.anythingSlider .thumbNav a {
    font-family: Verdana, Geneva, sans-serif;
    font-size:13px;
    display: inline-block;
    text-decoration: none;
    padding-top: 4px;
    height: 21px;
    width: 24px;
    margin: 0 5px 0 0;
    text-align: center;
    margin-top: 8px;
}
div.anythingSlider .thumbNav a:hover, div.anythingSlider .thumbNav a.cur {
    background-position: center top;
}
/* slider autoplay right-to-left, reverse order of nav links to look better */
div.anythingSlider.rtl .thumbNav a { float: left; } /* reverse order of nav links */
div.anythingSlider.rtl .thumbNav { float: left; }    /* move nav link group to left */
/* div.anythingSlider.rtl .start-stop { float: right; } */ /* move start/stop button - in case you want to switch sides */

div.anythingSlider, div.anythingSlider .anythingWindow, div.anythingSlider .thumbNav a, div.anythingSlider .arrow a, div.anythingSlider .start-stop {
    transition-duration: 0;
    -o-transition-duration: 0;
    -moz-transition-duration: 0;
    -webkit-transition-duration: 0;
}

.textSlide { margin: 15px; width:489px; height:178px; color:#fff;  }

I don't see the flicker problem you are referring to, but the active slide navigation is because a problem with the css.

In the css, all of the color/background settings are separated out and put at the top, so this one bit of css was being defined several times. So here is the complete, updated anythingslider.css file:

/*
    AnythingSlider v1.4.1+ Default (base) theme

    By Chris Coyier: http://css-tricks.com
    with major improvements by Doug Neiner: http://pixelgraphics.us/
    based on work by Remy Sharp: http://jqueryfordesigners.com/
*/

/******* SET DEFAULT DIMENSIONS HERE ********/
#sliderholder {
    background-image: url(../images/bg-slider.jpg);
    width: 533px;
    height: 270px;
    padding-left: 14px;
    padding-top: 14px;
}
div.anythingSlider {
    width: 519px;
    height: 208px;

}

/****** SET COLORS HERE *******/
/* Default State */
div.anythingSlider .thumbNav a {
    background: url(../images/thenav.png) center bottom;
    color: #fff;
}

div.anythingSlider .start-stop {
    background-color: #ff000;
    color: #fff;
}
div.anythingSlider .start-stop.playing {
    background-color: #800;
}
div.anythingSlider .start-stop:hover, div.anythingSlider .start-stop.hover {
    color: #ddd;
}

/* Active State */
div.anythingSlider .start-stop {
    background-color: #080;
    color: #fff;
}
div.anythingSlider .start-stop.playing {
    background-color: #d00;
}
div.anythingSlider .start-stop:hover, div.anythingSlider .start-stop.hover {
    color: #fff;
}

/**** DO NOT CHANGE BELOW THIS LINE ****/
/* anythingSlider viewport window */
div.anythingSlider .anythingWindow {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
}
/* wrapper: 45px right & left padding for the arrows, 28px @ bottom for navigation */
div.anythingSlider {
    position: relative;
    padding-bottom: 35px;
}
/* anythingSlider base UL */
ul.anythingBase {
    background: transparent;
    list-style: none;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
}
ul.anythingBase li.panel {
    background: transparent;
    display: block;
    float: left;
    padding: 0;
    margin: 0;
}

/* Navigation Links */
div.anythingSlider .anythingControls { outline: 0; }
div.anythingSlider .thumbNav { margin: 0; }
div.anythingSlider .thumbNav li { display: inline; }
div.anythingSlider .thumbNav a {
    font-family: Verdana, Geneva, sans-serif;
    font-size:13px;
    display: inline-block;
    text-decoration: none;
    padding-top: 4px;
    height: 21px;
    width: 24px;
    margin: 0 5px 0 0;
    text-align: center;
    margin-top: 8px;
}
div.anythingSlider .thumbNav a:hover, div.anythingSlider .thumbNav a.cur {
    background-position: center top;
}
/* slider autoplay right-to-left, reverse order of nav links to look better */
div.anythingSlider.rtl .thumbNav a { float: left; } /* reverse order of nav links */
div.anythingSlider.rtl .thumbNav { float: left; }    /* move nav link group to left */
/* div.anythingSlider.rtl .start-stop { float: right; } */ /* move start/stop button - in case you want to switch sides */

div.anythingSlider, div.anythingSlider .anythingWindow, div.anythingSlider .thumbNav a, div.anythingSlider .arrow a, div.anythingSlider .start-stop {
    transition-duration: 0;
    -o-transition-duration: 0;
    -moz-transition-duration: 0;
    -webkit-transition-duration: 0;
}

.textSlide { margin: 15px; width:489px; height:178px; color:#fff;  }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文