问题
I'm using NivoSlider and I'm not really good on using javascript so I was wondering if how can I change the transition effects on nivo-slider? or can I change it? If it is possible, I would like to use only one transition effects on my images. Please help.
回答1:
// This is the default setting:
$('#slider').nivoSlider({effect:'random'}) // Each transition effect will be random
// You can choose from the following effects:
- sliceDown
- sliceDownLeft
- sliceUp
- sliceUpLeft
- sliceUpDown
- sliceUpDownLeft
- fold
- fade
- random
- slideInRight
- slideInLeft
- boxRandom
- boxRain
- boxRainReverse
- boxRainGrow
- boxRainGrowReverse
回答2:
There are a number of "effects" the Nivo slider supports for transitions - have you seen the usage page yet? You pass an object literal to the nivoSlider call with the parameters you want to use, effect being one of them you can specify. A list of how all the parameters you can set are shown and immediately following that is a list of the available effects. You'll have to be more specific about what specific effect you want if you want a more specific answer.
回答3:
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider({effect:"fade"});
});
</script>
Use other effects as per your need in place of "fade"
来源:https://stackoverflow.com/questions/6436159/how-to-change-nivo-slider-easing