Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <html >
<head>
  <meta charset="UTF-8">
  <title>Spinning wheel with svg text</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>
  	<section class="full-screen">
		<div class="wheel-03">
			<svg preserveAspectRatio="xMinYMin meet" class="wheel-svg" version="1.1"
			     width="800" height="400"
			     viewBox="0 0 800 400">
				<g transform="translate(0,0)">
					<g transform="translate(0,250)" class="wheel-container">						
						<text x="0" y="-225" class="term term00">SMELL</text>
						<text x="0" y="-150" class="term term01">HELL</text>
						<text x="0" y="-75" class="term term02">SHOCK</text>
						<text x="0" y="0" class="term term03">BRAND</text>
						<text x="0" y="75" class="term term04">COOL</text>
						<text x="0" y="150" class="term term05">NICE</text>
						<text x="0" y="225" class="term term06">EYE</text>
						<text x="0" y="300" class="term term07">BEAUTY</text>
						<text x="0" y="375" class="term term08">CLOCK</text>
						<text x="0" y="450" class="term term09">WHEEL</text>
						
						<text x="0" y="525" class="term term10">SMELL</text>
						<text x="0" y="600" class="term term11">HELL</text>
						<text x="0" y="675" class="term term12">SHOCK</text>
						<text x="0" y="750" class="term term13">BRAND</text>
						<text x="0" y="825" class="term term14">COOL</text>
						<text x="0" y="900" class="term term15">NICE</text>
						<text x="0" y="975" class="term term16">EYE</text>
						<text x="0" y="1050" class="term term17">BEAUTY</text>
						<text x="0" y="1125" class="term term18">CLOCK</text>
						<text x="0" y="1200" class="term term19">WHEEL</text>
					</g>
				</g>
			</svg>
		</div>
	</section>
  <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js'></script>

    <script src="js/index.js"></script>

</body>
</html>

              
            
!

CSS

              
                html,
body {
  background-color: #000;
  color: #ffff00;
}
section {
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.full-screen {
  height: 100%;
}
.wheel-svg {
  margin-left: 10px;
  border: 4px dashed yellow;
  perspective: 300px;
}
.wheel-svg .term {
  font-family: GothamLight, sans-serif;
  font-size: 100px;
  letter-spacing: -1px;
  fill: #ffffff;
  opacity: 0;
}
.wheel-svg .term.term03 {
  opacity: 1;
}
.wheel-svg .term.term02,
.wheel-svg .term.term04 {
  opacity: 0.5;
}
.wheel-svg .term.term01,
.wheel-svg .term.term05 {
  opacity: 0.2;
}
              
            
!

JS

              
                $(window).load(function () {
 
  	var term01 = $('.wheel-03 .term01');
	var term02 = $('.wheel-03 .term02');
	var term03 = $('.wheel-03 .term03');
	var term04 = $('.wheel-03 .term04');
	var term05 = $('.wheel-03 .term05');
	var term06 = $('.wheel-03 .term06');
	var term07 = $('.wheel-03 .term07');
	var term08 = $('.wheel-03 .term08');
	var term09 = $('.wheel-03 .term09');
	var term10 = $('.wheel-03 .term10');
	var term11 = $('.wheel-03 .term11');
	var term12 = $('.wheel-03 .term12');
	var term13 = $('.wheel-03 .term13');
	var term14 = $('.wheel-03 .term13');
	var term15 = $('.wheel-03 .term13');
	var term16 = $('.wheel-03 .term13');
	var term17 = $('.wheel-03 .term13');
	var term18 = $('.wheel-03 .term13');
	var term19 = $('.wheel-03 .term13');
	var term20 = $('.wheel-03 .term13');

	var stepFrame = 5;

  
  	// css classes
	tl01 = new TimelineLite();
	tl01
	.to(term01, stepFrame, {
			css: {className: 'term term00'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})

	tl02 = new TimelineLite();
	tl02
	.to(term02, stepFrame, {
			css: {className: 'term term01'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term02, stepFrame, {
			css:{className: 'term term00'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		});

	tl03 = new TimelineLite();
	tl03
	.to(term03, stepFrame, {
			css: {className: 'term term02'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term03, stepFrame, {
			css: {className: 'term term01'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term03, stepFrame, {
			css:{className: 'term term00'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		});

	tl04 = new TimelineLite();
	tl04
	.to(term04, stepFrame, {
			css: {className: 'term term03'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term04, stepFrame, {
			css: {className: 'term term02'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term04, stepFrame, {
			css: {className: 'term term01'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term04, stepFrame, {
			css:{className: 'term term00'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		});


	tl05 = new TimelineLite();
	tl05
	.to(term05, stepFrame, {
			css: {className: 'term term04'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term05, stepFrame, {
			css: {className: 'term term03'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term05, stepFrame, {
			css: {className: 'term term02'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term05, stepFrame, {
			css: {className: 'term term01'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term05, stepFrame, {
			css:{className: 'term term00'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		});

	tl06 = new TimelineLite();
	tl06
	.to(term06, stepFrame, {
			css: {className: 'term term05'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term06, stepFrame, {
			css: {className: 'term term04'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term06, stepFrame, {
			css: {className: 'term term03'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term06, stepFrame, {
			css: {className: 'term term02'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term06, stepFrame, {
			css: {className: 'term term01'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term06, stepFrame, {
			css:{className: 'term term00'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		});

	tl07 = new TimelineLite();
	tl07
	.to(term07, stepFrame, {
			css: {className: 'term term06'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term07, stepFrame, {
			css: {className: 'term term05'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term07, stepFrame, {
			css: {className: 'term term04'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term07, stepFrame, {
			css: {className: 'term term03'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term07, stepFrame, {
			css: {className: 'term term02'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term07, stepFrame, {
			css: {className: 'term term01'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term07, stepFrame, {
			css:{className: 'term term00'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		});

	tl08 = new TimelineLite();
	tl08
	.to(term08, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term08, stepFrame, {
			css: {className: 'term term06'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term08, stepFrame, {
			css: {className: 'term term05'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term08, stepFrame, {
			css: {className: 'term term04'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term08, stepFrame, {
			css: {className: 'term term03'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term08, stepFrame, {
			css: {className: 'term term02'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term08, stepFrame, {
			css: {className: 'term term01'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	;

	tl09 = new TimelineLite();
	tl09
	.to(term09, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term09, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term09, stepFrame, {
			css: {className: 'term term06'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term09, stepFrame, {
			css: {className: 'term term05'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term09, stepFrame, {
			css: {className: 'term term04'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term09, stepFrame, {
			css: {className: 'term term03'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term09, stepFrame, {
			css: {className: 'term term02'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	;

	tl10 = new TimelineLite();
	tl10
	.to(term10, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term10, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term10, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term10, stepFrame, {
			css: {className: 'term term06'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term10, stepFrame, {
			css: {className: 'term term05'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term10, stepFrame, {
			css: {className: 'term term04'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term10, stepFrame, {
			css: {className: 'term term03'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	;

	tl11 = new TimelineLite();
	tl11
	.to(term11, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term11, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term11, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term11, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term11, stepFrame, {
			css: {className: 'term term06'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term11, stepFrame, {
			css: {className: 'term term05'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term11, stepFrame, {
			css: {className: 'term term04'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	;

	tl12 = new TimelineLite();
	tl12
	.to(term12, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term12, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term12, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term12, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term12, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term12, stepFrame, {
			css: {className: 'term term06'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term12, stepFrame, {
			css: {className: 'term term05'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	;

	tl13 = new TimelineLite();
	tl13
	.to(term13, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term13, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term13, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term13, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term13, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term13, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term13, stepFrame, {
			css: {className: 'term term06'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	;

	tl14 = new TimelineLite();
	tl14
	.to(term14, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term14, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term14, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term14, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term14, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term14, stepFrame, {
			css: {className: 'term term08'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term14, stepFrame, {
			css: {className: 'term term07'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	;

	tl15 = new TimelineLite();
	tl15
	.to(term15, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term15, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term15, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term15, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term15, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term15, stepFrame, {
			css: {className: 'term term09'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term15, stepFrame, {
			css: {className: 'term term08'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	;

	tl16 = new TimelineLite();
	tl16
	.to(term16, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term16, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term16, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term16, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term16, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term16, stepFrame, {
			css: {className: 'term term10'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term16, stepFrame, {
			css: {className: 'term term09'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	;

	tl17 = new TimelineLite();
	tl17
	.to(term17, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term17, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term17, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term17, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term17, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term17, stepFrame, {
			css: {className: 'term term11'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term17, stepFrame, {
			css: {className: 'term term10'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	;

	tl18 = new TimelineLite();
	tl18
	.to(term18, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term18, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term18, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term18, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term18, stepFrame, {
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term18, stepFrame, {
			css: {className: 'term term12'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	.to(term18, stepFrame, {
			css: {className: 'term term11'},
			attr: {y: '-=75'},
			ease: Linear.easeNone
		})
	;

	// tl19 = new TimelineLite();
	// tl19
	// .to(term19, stepFrame, {
			// attr: {y: '-=75'},
			// ease: Linear.easeNone
		// })
	// .to(term19, stepFrame, {
			// attr: {y: '-=75'},
			// ease: Linear.easeNone
		// })
	// .to(term19, stepFrame, {
			// attr: {y: '-=75'},
			// ease: Linear.easeNone
		// })
	// .to(term19, stepFrame, {
			// attr: {y: '-=75'},
			// ease: Linear.easeNone
		// })
	// .to(term19, stepFrame, {
			// attr: {y: '-=75'},
			// ease: Linear.easeNone
		// })
	// .to(term19, stepFrame, {
			// css: {className: 'term term13'},
			// attr: {y: '-=75'},
			// ease: Linear.easeNone
		// })
	// .to(term19, stepFrame, {
			// css: {className: 'term term12'},
			// attr: {y: '-=75'},
			// ease: Linear.easeNone
		// })
	// ;

	var wheelTurn = 0.3;

	wheel03 = new TimelineMax({repeat: 200, timeScale: 3});
	wheel03.add(tl01, 0);
	wheel03.add(tl02, 0);
	wheel03.add(tl03, 0);
	wheel03.add(tl04, 0);
	wheel03.add(tl05, 0);
	wheel03.add(tl06, 0);
	wheel03.add(tl07, 0);
	wheel03.add(tl08, 0);
	wheel03.add(tl09, 0);
	wheel03.add(tl10, 0);
	wheel03.add(tl11, 0);
	wheel03.add(tl12, 0);
	wheel03.add(tl13, 0);
	wheel03.add(tl14, 0);
	wheel03.add(tl15, 0);
	wheel03.add(tl16, 0);
	wheel03.add(tl17, 0);
	wheel03.add(tl18, 0);
	wheel03.play();

	TweenMax.to(wheel03, 0.1, {timeScale: 5, ease: Circ.easeOut})
	TweenMax.to(wheel03, 4.9, {timeScale: 5, delay: 5, ease: Circ.easeOut})
});
              
            
!
999px

Console