问题
I need a specific carousel that have, for example, 4 visible slides from 10 and you can scroll through each of them. When you click on thumb, it opens image on top.
Below follows an image:
I used lots of sliders but did not found what i am looking for.
回答1:
You could give the container the Carousel is in a background image then use some jquery to change the background image when one of the pictures is clicked.
Surround each image with
<a href="javascript:;" id="img1"></a>
then use jquery
$('#img1').on('click', function() {
$('#changeMe').css('background-image', 'url(bg1.jpg)');
})
finally in css
#changeMe {
background-image: url(bg1.jpg);
background-repeat: no-repeat;
}
edit see http://www.bootply.com/PCAYskJ3Tl for quick example
来源:https://stackoverflow.com/questions/24835391/carousel-with-open-image-on-click