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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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 id="testimonials">
	<ul>
		<li>
			<p class="testimonial-body">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi volutpat iaculis tellus, nec sagittis ante auctor sed. Nullam sit amet augue sed sapien commodo imperdiet. Sed id nunc placerat, volutpat tortor et, iaculis turpis.</p>
			<div class="testimonial-profile">
				<div class="img-cover"></div>
				<svg><circle></svg>
				<img src="https://source.unsplash.com/128x128/?boy,face" alt="">
				<span>Name Here</span>
				<br><small data-social="facebook">Feb 2, 2017</small>
			</div>
		</li><li>
			<p class="testimonial-body">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi volutpat iaculis tellus, nec sagittis ante auctor sed.</p>
			<div class="testimonial-profile">
				<div class="img-cover"></div>
				<svg><circle></svg>
				<img src="https://source.unsplash.com/128x128/?girl,face" alt="">
				<span>Name Here</span>
				<br><small data-social="twitter">May 5, 2017</small>
			</div>
		</li><li>
			<p class="testimonial-body">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi volutpat iaculis tellus, nec sagittis ante auctor sed. Nullam sit amet augue sed sapien commodo imperdiet.</p>
			<div class="testimonial-profile">
				<div class="img-cover"></div>
				<svg><circle></svg>
				<img src="https://source.unsplash.com/128x128/?man,face" alt="">
				<span>Name Here</span>
				<br><small data-social="google">Jun 17, 2017</small>
			</div>
		</li><li>
			<p class="testimonial-body">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi volutpat iaculis tellus, nec sagittis ante auctor sed. Nullam sit amet augue sed sapien commodo imperdiet. Sed id nunc placerat.</p>
			<div class="testimonial-profile">
				<div class="img-cover"></div>
				<svg><circle></svg>
				<img src="https://source.unsplash.com/128x128/?woman,face" alt="">
				<span>Name Here</span>
				<br><small data-social="facebook">Jan 11, 2018</small>
			</div>
		</li>
	</ul>
</div>
              
            
!

CSS

              
                $accent: #eceff1;
$progress: #33a5ff;
$progress2: #4dcb52;
$testimonialCount: 4;
$testimonialPause: 15;
$testimonialSlide: .25;
$profileImgSize: 48;
$progressStrokeW: 3.5px;
$pi: 3.14159265;
body {
	overflow: hidden;
	font-family: "Montserrat", sans-serif;
	font-weight: 400;
	color: darken($accent,40%);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
#testimonials {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
	width: 250px;
	background: $accent;
	border-radius: 15px;
	overflow: hidden;
	ul {
		display: flex;
		margin: 0;
		padding: 0;
		width: calc(100% * #{$testimonialCount});
		height: 100%;
		padding-left: 0;
		list-style: none;
		animation: testimonial-slide #{($testimonialCount * ($testimonialPause + $testimonialSlide)) * 1s} infinite;
		li {
			display: flex;
			flex-direction: column;
			padding: 16px;
			width: calc(100% / #{$testimonialCount});
			flex-shrink: 0;
			user-select: none;
			box-sizing: border-box;
			line-height: 1.5;
			.testimonial-body {
				flex-grow: 1;
				margin: 0;
				quotes: "“" "”" "‘" "’";
				&:before, &:after {
					display: inline-block;
					position: relative;
					transform: scale(1.25);
				}
				&:before { content: open-quote; left: -1px; }
				&:after { content: close-quote; right: -1px; }
			}
			.testimonial-profile {
				position: relative;
				white-space: nowrap;
				margin-top: .75rem;
				.img-cover {
					position: absolute;
					width: #{$profileImgSize + "px"};
					height: #{$profileImgSize + "px"};
					border-radius: 1000px;
					box-shadow: 0 7px 10px -2px rgba(darken($accent,50%),0.55);
					// transition: all 0s ease-in-out;
					transition: all 0.15s ease-in-out;
					background: rgba(0, 0, 0, 0.375);
					opacity: 0;
					z-index: 1;
					&:after {
						content: "\f04b";
						display: inline-block;
						font-family: FontAwesome;
						font-size: 18px;
						color: #fff;
						position: absolute;
						top: 50%;
						left: 50%;
						transform: translate(-50%,-50%);
						transition: all 0.15s ease-in-out;
						z-index: 999;
					}
				}
				svg {
					position: absolute;
					width: #{$profileImgSize + "px"};
					height: #{$profileImgSize + "px"};
					top: 0;
					left: 0;
					filter: drop-shadow(0 0 4px rgba($progress,.5));
					transform: rotate(90deg);
					overflow: visible;
					z-index: 1;
					animation: testimonial-progress-svg #{($testimonialPause + $testimonialSlide) * 1s} /*linear*/ infinite;
					pointer-events: none;
					circle {
						transform-origin: center;
						cx: $profileImgSize / 2;
						cy: $profileImgSize / 2;
						r: $profileImgSize / 2;
						stroke-linecap: round;
						fill: none;
						stroke: $progress;
						stroke-width: 4px;
						stroke-dasharray: $profileImgSize * $pi;
						stroke-dashoffset: $profileImgSize * $pi;
						animation: testimonial-progress-circle #{($testimonialPause + $testimonialSlide) * 1s} /*linear*/ infinite;
					}
				}
				img, span, small {
					float: left;
					white-space: inherit;
				}
				img {
					margin-right: .75rem;
					width: #{$profileImgSize + "px"};
					height: #{$profileImgSize + "px"};
					border-radius: 1000px;
					box-shadow: 0 7px 10px -2px rgba(darken($accent,50%),0.55);
					// cursor: pointer;
					transition: all 0.1s ease-in-out;
					// @media (min-width: 768px) {
					// 	&:hover { transform: scale(1.1); }
					// }
				}
				span {
					vertical-align: top;
					font-weight: 500;
					color: darken($accent,50%);
				}
				small {
					font-weight: 300;
					color: darken($accent,30%);
					&[data-social] {
						&:before {
							display: inline-block;
							margin-right: 10px;
							font-family: "Font Awesome 5 Brands";
							font-size: inherit;
							transform: scale(1.1);
						}
						&[data-social="facebook"]:before {
							content: '\f082';
							color: #3b5998;
						}
						&[data-social="twitter"]:before {
							content: '\f099';
							color: #1da1f2;
						}
						&[data-social="google"]:before {
							content: '\f0d5';
							color: #ea4335;
						}
					}
				}
			}
		}
		// @media (min-width: 768px) {
			&:hover {
				&, svg, circle {
					animation-play-state: paused !important;
				}
				li .testimonial-profile .img-cover {
					opacity: 1;
					transition: all 0.15s ease-in-out;
					&:after {
						content: "\f04c";
					}
				}
			}
		// }
	}
}
@keyframes testimonial-slide {
	@for $i from 0 through ($testimonialCount - 1) {
		#{$i * (100% / $testimonialCount)}, #{($i * (100% / $testimonialCount)) + (($testimonialPause / ($testimonialCount * ($testimonialPause + $testimonialSlide))) * 100%)} {
			transform: translateX(calc(#{$i * -1} * (100% / #{$testimonialCount})));
		}
	}
	100% { transform: translateX(0); }
}
@keyframes testimonial-progress-svg {
	0% {
		filter: drop-shadow(0 0 4px rgba($progress,.5));
	}
	#{($testimonialPause / ($testimonialPause + $testimonialSlide)) * 50%} {
		filter: drop-shadow(0 0 4px rgba(mix($progress,$progress2),.5));
	}
	#{($testimonialPause / ($testimonialPause + $testimonialSlide)) * 100%}, #{((($testimonialPause / ($testimonialPause + $testimonialSlide)) + 1) / 2) * 100%} {
		filter: drop-shadow(0 0 4px rgba($progress2,.5));
	}
	#{((($testimonialPause / ($testimonialPause + $testimonialSlide)) + 1) / 2) * 100%}, 100% {
		filter: drop-shadow(0 0 4px rgba($progress2,.5));
	}
}
@keyframes testimonial-progress-circle {
	0% {
		stroke: $progress;
		stroke-width: 3px;
		stroke-dasharray: $profileImgSize * $pi;
		stroke-dashoffset: #{$profileImgSize * $pi - 1};
		transform: rotate(0deg);
	}
	#{($testimonialPause / ($testimonialPause + $testimonialSlide)) * 50%} {
		stroke-dasharray: $profileImgSize * $pi / 3.6;
		stroke-dashoffset: #{($profileImgSize * $pi - 1) / 4};
	}
	#{($testimonialPause / ($testimonialPause + $testimonialSlide)) * 100%}, #{((($testimonialPause / ($testimonialPause + $testimonialSlide)) + 1) / 2) * 100%} {
		stroke: $progress2;
		stroke-width: $progressStrokeW;
		stroke-dasharray: $profileImgSize * $pi;
		stroke-dashoffset: 0;
		transform: rotate(2340deg);
	}
	#{((($testimonialPause / ($testimonialPause + $testimonialSlide)) + 1) / 2) * 100%}, 100% {
		stroke: $progress;
		stroke-width: 0px;
		stroke-dashoffset: #{$profileImgSize * $pi - 1};
		transform: rotate(0deg);
	}
} 
              
            
!

JS

              
                //no JS here!
              
            
!
999px

Console