什么滑块(几个问题)

时间:2011-01-28 14:01:36

标签: jquery css slider anythingslider

我有几个问题,我已经花了几个小时,显然我真的需要帮助。

我使用anythingslider进行内容幻灯片放映。您可以在此处找到它:http://ontwikkelomgeving.wijzijnblits.nl/fobservices/slider

现在出现问题:

  1. 有转换时闪烁。 (最大的问题)
  2. 你看不到按钮何时处于活动状态(它应该将背景img设置为顶部)
  3. 当我点击一个按钮时,它会显示活动状态,但是一旦我将其悬停,它就会消失。此外,如果我点击另一个按钮,我不会悬停第一个按钮,那么我将获得2个活动状态。
  4. 有人可以帮我解决这些问题吗? 非常感谢一堆!!

2 个答案:

答案 0 :(得分:3)

可能最佳答案。

但尝试this slider可能会更快,因为我记得它易于使用且快速实施。

答案 1 :(得分:1)

我没有看到你所指的闪烁问题,但主动幻灯片导航是因为css有问题。

在css中,所有的颜色/背景设置都被分离出来并放在顶部,因此这一位css被定义了好几次。所以这里是完整的,更新的anythingslider.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;  }