Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                 <div class="wrapper">
	 <header><h1>TESTIMONIALS</h1></header>
	<!-- Slider main container -->
	<div class="swiper">
		<!-- Additional required wrapper -->
		<div class="swiper-wrapper">
			<!-- Slides -->
			<div class="swiper-slide">
				<div class="content-wrapper">
					<div class="content">
						<div class="swiper-avatar"><img src="https://bikes-n-stuff.com/wp-content/uploads/sb-instagram-feed-images/julietelliott.jpg"></div>
						<p>"Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec id elit non mi porta gravida at eget metus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum."</p>
						<p class="cite">- Juliet Elliott, Cyclist</p>
					</div>
				</div>
			</div>
			<div class="swiper-slide">
				<div class="content-wrapper">
					<div class="content">
						<div class="swiper-avatar"><img src="https://dgtzuqphqg23d.cloudfront.net/aqUDdv8fco91cPIeBAetAcpDfUEOIuaIrivU11PMnBs-2048x1942.jpg"></div>
						<p>"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed posuere consectetur est at lobortis. Nullam id dolor id nibh ultricies vehicula ut id elit. Curabitur blandit tempus porttitor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros."</p>
						<p class="cite">- Katie Kookaburra, Cyclist</p>
					</div>
				</div>
			</div>
			<div class="swiper-slide">
				<div class="content-wrapper">
					<div class="content">
						<div class="swiper-avatar"><img src="https://dgalywyr863hv.cloudfront.net/pictures/athletes/188112/45714/8/full.jpg"></div>
						<p>"Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec id elit non mi porta gravida at eget metus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum."</p>
						<p class="cite">- Alison Tetrick, Cyclist</p>
					</div>
				</div>
			</div>
		</div>

		<!-- If we need pagination -->
		<!-- If we need navigation buttons -->
		<div class="swiper-nav-wrapper">
			<div class="swiper-button-prev"></div>
			<div class="swiper-pagination"></div>
			<div class="swiper-button-next"></div>
		</div>
	</div>
</div>
              
            
!

CSS

              
                // variables
@mixin bp($class) {
	@if $class == mobile {
		@media (min-width: 640px) {
			@content;
		}
	} @else if $class == tablet {
		@media (min-width: 992px) {
			@content;
		}
	} @else if $class == laptop {
		@media (min-width: 1024px) {
			@content;
		}
	} @else if $class == desktop {
		@media (min-width: 1280px) {
			@content;
		}
	} @else if $class == cinema {
		@media (min-width: 1536px) {
			@content;
		}
	}
}

@mixin no-margin {
	margin: 0;
}
@mixin labotomized-owl {
	* + * {
		margin: 0.75em 0 0;
	}
}
// Variables
@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300;400;700&display=swap");
$g-font-family: "Roboto Condensed", sans-serif;
$g-line-height: 1.5 !default;
$g-spacing: $g-line-height * 1em;
$black: #000;
$white: #fff;
$g-background-color-dark: #18181b;

// global
body,
html {
	min-height: 100%;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1em;
	line-height: 1.2;
	background: $g-background-color-dark;
	font-family: $g-font-family;
	font-weight: 300;
	box-sizing: border-box;
	p {
		line-height: 1.6;
	}
	img {
		width: 100%;
		height: auto;
	}
	.button {
		position: relative;
		display: table;
		padding: $g-spacing / 2 $g-spacing * 2;
		background: #000;
		color: #fff;
		text-decoration: none;
		margin-top: $g-spacing;
		text-transform: uppercase;
		&:hover {
			background: lighten(#222, 5%);
		}
	}
	.wrapper {
		width: 100%;
		max-width: 1200px;
		margin: 0 auto;
		text-align:center;
		color:$white;
		padding:$g-spacing;
	}
	header {
		margin:0;
		padding:0;
	}
}

* {
	@include labotomized-owl;
}

// Start Swiper
.swiper {
	padding:$g-spacing;
	.content-wrapper {
		
		position: relative;
		display: grid;
		grid-template-columns: 1fr;
		grid-template-rows: 1fr;
		grid-template-areas: ".";
		width: 100%;
		justify-items: center;
		align-items: center;
		.content {
			padding: $g-spacing * 2 $g-spacing;
				text-align: center;
				display: grid;
				justify-items: center;
				align-items: center;
				margin:0 auto;
			color:$black;
			:first-child {
				margin: 0;
			}
			.swiper-avatar {
				width:100%;
				max-width:125px;
				height:auto;
				img {
					border-radius: 500px;
				}
			}
			.cite {
				font-size:14px;
				font-weight:bold;
			}
		}
	}
	.swiper-slide {
		margin: 0;
		height: auto;
		width: 100%;
		padding:0;
		opacity:.2;
		background:rgba(255,255,255,.3);
		border-radius:6px;
		transition: all .5s ease-in-out;
		&.swiper-slide-active {
			background:rgba(255,255,255,1);
			opacity:1;
			transform: scale(1.1);
		}
	}
	.swiper-nav-wrapper {
		bottom: 0;
		left: 0;
		right: 0;
		display: flex;
		justify-content: center;
		align-items: center;
		margin: 0 auto;
		width: auto;
		padding-top:$g-spacing * 2;
		.swiper-button-next,
		.swiper-button-prev {
			top: 0;
			top: auto;
			left: auto;
			right: auto;
			position: relative !important;
			&:after {
				display: none;
			}
		}
		.swiper-button-next,
		.swiper-container-rtl .swiper-button-prev {
			background-image: url("data:image/svg+xml,%0A%3Csvg width='9px' height='16px' viewBox='0 0 9 16' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='chevron-right' fill='%23FFFFFF' fill-rule='nonzero'%3E%3Cpath d='M8.674805,7.066406 L1.924805,0.316406 C1.696288,0.105468 1.432619,0 1.133789,0 C0.834959,0 0.57129,0.105468 0.342773,0.316406 C0.114257,0.544923 0,0.808592 0,1.107422 C0,1.406251 0.114257,1.669921 0.342773,1.898438 L6.301758,7.857422 L0.342773,13.816406 C0.114257,14.044923 0,14.308592 0,14.607422 C0,14.906251 0.114257,15.169921 0.342773,15.398438 C0.465821,15.521485 0.584472,15.609375 0.69873,15.662109 C0.812989,15.714844 0.958007,15.741211 1.133789,15.741211 C1.309571,15.741211 1.454589,15.714844 1.568848,15.662109 C1.683106,15.609375 1.801757,15.521485 1.924805,15.398438 L8.674805,8.648438 C8.903321,8.419921 9.017578,8.156251 9.017578,7.857422 C9.017578,7.558592 8.903321,7.294923 8.674805,7.066406 Z' id='Path'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E") !important;
			width: 20px;
			height: 20px;
			background-size: 20px 20px;
			background-repeat: no-repeat;
			margin: 0;
			padding: 0;
		}

		.swiper-button-prev,
		.swiper-container-rtl .swiper-button-next {
			background-image: url("data:image/svg+xml,%0A%3Csvg width='9px' height='16px' viewBox='0 0 9 16' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='chevron-right' transform='translate(4.508789, 7.870605) rotate(-180.000000) translate(-4.508789, -7.870605) translate(-0.000000, -0.000000)' fill='%23FFFFFF' fill-rule='nonzero'%3E%3Cpath d='M8.674805,7.066406 L1.924805,0.316406 C1.696288,0.105468 1.432619,0 1.133789,0 C0.834959,0 0.57129,0.105468 0.342773,0.316406 C0.114257,0.544923 0,0.808592 0,1.107422 C0,1.406251 0.114257,1.669921 0.342773,1.898438 L6.301758,7.857422 L0.342773,13.816406 C0.114257,14.044923 0,14.308592 0,14.607422 C0,14.906251 0.114257,15.169921 0.342773,15.398438 C0.465821,15.521485 0.584472,15.609375 0.69873,15.662109 C0.812989,15.714844 0.958007,15.741211 1.133789,15.741211 C1.309571,15.741211 1.454589,15.714844 1.568848,15.662109 C1.683106,15.609375 1.801757,15.521485 1.924805,15.398438 L8.674805,8.648438 C8.903321,8.419921 9.017578,8.156251 9.017578,7.857422 C9.017578,7.558592 8.903321,7.294923 8.674805,7.066406 Z' id='Path'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E") !important;
			width: 20px;
			height: 20px;
			background-size: 20px 20px;
			background-repeat: no-repeat;
			margin: 0;
			padding: 0;
		}
	}
}

.swiper-pagination {
	margin: 0;
	padding: 0;
	width: auto;
	position: relative !important;
	display: block;
	width: auto;
	.swiper-pagination-bullets {
		margin: 0;

		.swiper-pagination-bullet {
			margin: 0;
			background: #fff !important;
		}
	}
}
.swiper-pagination-bullet {
	background: #fff !important;
			transition: all .2s ease-in-out;
}

.swiper-pagination-bullets.swiper-pagination-horizontal {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	bottom: 0;
	top: 0;
	bottom: 0;
	width: auto;
	padding: 0 $g-spacing;
}
.swiper-pagination-bullet-active {
				transform: scale(1.5);
}
              
            
!

JS

              
                const swiper = new Swiper(".swiper", {
	// Optional parameters
	direction: "horizontal",
	loop: true,
	autoHeight: false,
	centeredSlides:true,
	slidesPerView: 1,
  // Responsive breakpoints
  breakpoints: {
		640: {
      slidesPerView:2,
			  spaceBetween: 40,
    },
    992: {
      slidesPerView: 3,
			  spaceBetween: 40,
    }
  },

	// If we need pagination
	pagination: {
		el: ".swiper-pagination"
	},

	// Navigation arrows
	navigation: {
		nextEl: ".swiper-button-next",
		prevEl: ".swiper-button-prev"
	}

	// And if we need scrollbar
	/*scrollbar: {
    el: '.swiper-scrollbar',
  },*/
});

              
            
!
999px

Console