开发者

anything slider (several problems)

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 proble开发者_高级运维ms:

  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!!


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.


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;  }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜