Twitter Bootstrap Carousel display two items -
right have implemented twitter bootstrap 3 carousel
displays 1 item , during transition, shows next element, looks like:
[1] /transition/ [2] /transition/ [3] ...
i have display 2 items , after transition display second element third one:
[1][2] /transition/ [2][3] /transition/ [3][4] ...
is possible achieve ?
i have tried apply active
class 2 elements on page load, carousel
not work anymore. using following css not work:
.item.active + .item { display: block !important; }
hsz's solution worked fine until twitter bootstrap 3.3 added support 3d transform override styles transition (left: 50% , left: -50%)
therefore have override twitter bootstrap default transition styles following css:
@media , (transform-3d), (-webkit-transform-3d) { .carousel-inner > .item.next, .carousel-inner > .item.active.right { left: 0; -webkit-transform: translate3d(50%, 0, 0); transform: translate3d(50%, 0, 0); } .carousel-inner > .item.prev, .carousel-inner > .item.active.left { left: 0; -webkit-transform: translate3d(-50%, 0, 0); transform: translate3d(-50%, 0, 0); } }
you may need change 50% 33% if display 3 items etc
Comments
Post a Comment