0

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

我将anyslider 用于内容幻灯片。你可以在这里找到它:http: //ontwikkelomgeving.wijzijnblits.nl/fobservices/slider

现在的问题:

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

有人可以帮我解决这些问题吗?提前致谢!

4

2 回答 2

3

可能不是最好的答案。

但也许尝试这个滑块会更快,因为我记得它易于使用且实现快速。

于 2011-01-28T14:21:06.840 回答
1

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

在 css 中,所有的颜色/背景设置都被分离出来并放在顶部,所以这一点 css 被定义了好几次。所以这里是完整的、更新的anyslider.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;  }
于 2011-03-01T02:33:38.790 回答