html Bootstrap show 4 advance 1

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html Bootstrap show 4 advance 1相关的知识,希望对你有一定的参考价值。

				<div class="carousel carousel-showmanymoveone slide" id="carousel123" data-interval="5000">
					<div class="carousel-inner">
						<div class="item active">
							<div class="col-xs-3"><a href="#"><img src="http://placehold.it/500/0054A6/fff/&amp;text=1" class="img-responsive"></a></div>
						</div>
						<div class="item">
							<div class="col-xs-3"><a href="#"><img src="http://placehold.it/500/002d5a/fff/&amp;text=2" class="img-responsive"></a></div>
						</div>
						<div class="item">
							<div class="col-xs-3"><a href="#"><img src="http://placehold.it/500/d6d6d6/333&amp;text=3" class="img-responsive"></a></div>
						</div>          
						<div class="item">
							<div class="col-xs-3"><a href="#"><img src="http://placehold.it/500/002040/eeeeee&amp;text=4" class="img-responsive"></a></div>
						</div>
						<div class="item">
							<div class="col-xs-3"><a href="#"><img src="http://placehold.it/500/0054A6/fff/&amp;text=5" class="img-responsive"></a></div>
						</div>
						<div class="item">
							<div class="col-xs-3"><a href="#"><img src="http://placehold.it/500/002d5a/fff/&amp;text=6" class="img-responsive"></a></div>
						</div>
						<div class="item">
							<div class="col-xs-3"><a href="#"><img src="http://placehold.it/500/eeeeee&amp;text=7" class="img-responsive"></a></div>
						</div>
						<div class="item">
							<div class="col-xs-3"><a href="#"><img src="http://placehold.it/500/40a1ff/002040&amp;text=8" class="img-responsive"></a></div>
						</div>
					</div>
					<a class="left carousel-control" href="#carousel123" data-slide="prev"><i class="glyphicon glyphicon-chevron-left"></i></a>
					<a class="right carousel-control" href="#carousel123" data-slide="next"><i class="glyphicon glyphicon-chevron-right"></i></a>
				</div>



<script>
	//script for modified bootstrap carousel show 4 advance 1
	(function(){
		jQuery('.carousel-showmanymoveone .item').each(function(){
			var itemToClone = jQuery(this);

			for (var i=1;i<4;i++) {
				itemToClone = itemToClone.next();

      // wrap around if at end of item collection
      if (!itemToClone.length) {
      	itemToClone = jQuery(this).siblings(':first');
      }

      // grab item, clone, add marker class, add to collection
      itemToClone.children(':first-child').clone()
      .addClass("cloneditem-"+(i))
      .appendTo(jQuery(this));
  }
});
	}());
</script>


/*Carousel for Featured clients - show 4 advance 1*/

.carousel-showmanymoveone .carousel-control {
	width: 4%;
	background-image: none;
}
.carousel-showmanymoveone .carousel-control.left {
	margin-left: 15px;
}
.carousel-showmanymoveone .carousel-control.right {
	margin-right: 15px;
}
/*.carousel-showmanymoveone .cloneditem-1,
.carousel-showmanymoveone .cloneditem-2,
.carousel-showmanymoveone .cloneditem-3 {
	display: none;
	} <--this hides cloned items at mobile sizes if you use additional bootstrap classes*/
	@media all and (min-width: 768px) {
		.carousel-showmanymoveone .carousel-inner > .active.left,
		.carousel-showmanymoveone .carousel-inner > .prev {
			left: -50%;
		}
		.carousel-showmanymoveone .carousel-inner > .active.right,
		.carousel-showmanymoveone .carousel-inner > .next {
			left: 50%;
		}
		.carousel-showmanymoveone .carousel-inner > .left,
		.carousel-showmanymoveone .carousel-inner > .prev.right,
		.carousel-showmanymoveone .carousel-inner > .active {
			left: 0;
		}
		.carousel-showmanymoveone .carousel-inner .cloneditem-1 {
			display: block;
		}
	}
	@media all and (min-width: 768px) and (transform-3d), all and (min-width: 768px) and (-webkit-transform-3d) {
		.carousel-showmanymoveone .carousel-inner > .item.active.right,
		.carousel-showmanymoveone .carousel-inner > .item.next {
			-webkit-transform: translate3d(50%, 0, 0);
			transform: translate3d(50%, 0, 0);
			left: 0;
		}
		.carousel-showmanymoveone .carousel-inner > .item.active.left,
		.carousel-showmanymoveone .carousel-inner > .item.prev {
			-webkit-transform: translate3d(-50%, 0, 0);
			transform: translate3d(-50%, 0, 0);
			left: 0;
		}
		.carousel-showmanymoveone .carousel-inner > .item.left,
		.carousel-showmanymoveone .carousel-inner > .item.prev.right,
		.carousel-showmanymoveone .carousel-inner > .item.active {
			-webkit-transform: translate3d(0, 0, 0);
			transform: translate3d(0, 0, 0);
			left: 0;
		}
	}
	@media all and (min-width: 992px) {
		.carousel-showmanymoveone .carousel-inner > .active.left,
		.carousel-showmanymoveone .carousel-inner > .prev {
			left: -25%;
		}
		.carousel-showmanymoveone .carousel-inner > .active.right,
		.carousel-showmanymoveone .carousel-inner > .next {
			left: 25%;
		}
		.carousel-showmanymoveone .carousel-inner > .left,
		.carousel-showmanymoveone .carousel-inner > .prev.right,
		.carousel-showmanymoveone .carousel-inner > .active {
			left: 0;
		}
		.carousel-showmanymoveone .carousel-inner .cloneditem-2,
		.carousel-showmanymoveone .carousel-inner .cloneditem-3 {
			display: block;
		}
	}
	@media all and (min-width: 992px) and (transform-3d), all and (min-width: 992px) and (-webkit-transform-3d) {
		.carousel-showmanymoveone .carousel-inner > .item.active.right,
		.carousel-showmanymoveone .carousel-inner > .item.next {
			-webkit-transform: translate3d(25%, 0, 0);
			transform: translate3d(25%, 0, 0);
			left: 0;
		}
		.carousel-showmanymoveone .carousel-inner > .item.active.left,
		.carousel-showmanymoveone .carousel-inner > .item.prev {
			-webkit-transform: translate3d(-25%, 0, 0);
			transform: translate3d(-25%, 0, 0);
			left: 0;
		}
		.carousel-showmanymoveone .carousel-inner > .item.left,
		.carousel-showmanymoveone .carousel-inner > .item.prev.right,
		.carousel-showmanymoveone .carousel-inner > .item.active {
			-webkit-transform: translate3d(0, 0, 0);
			transform: translate3d(0, 0, 0);
			left: 0;
		}
	}

以上是关于html Bootstrap show 4 advance 1的主要内容,如果未能解决你的问题,请参考以下文章

BootStrap之基础-4 插件(JS插件)

Python3.4+Django1.9+Bootstrap3

bootstrap fileinput-上传回调

转接口IC ADV7280/ADV7280-M:CVBS转MIPI转接口芯片 10位4倍过采样标清电视视频解码器,支持去隔行

bootstrap表单label和input在一行显示

Bootstrap源码分析之navcollapse