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

              
                
<svg width="100%" height="100%" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<!-- 	POLYGONS -->
	<g id=polygons>
		<polygon class="p1" points="0,100 0,300 100,300 100,100 50,0" style="fill:white;transform:translateY(-133px)" />
		<polygon class="p2" points="0,100 0,300 100,300 100,100 50,0" style="fill:red;transform:translateY(-100px)" />
		<polygon class="p3" points="0,100 0,300 100,300 100,100 50,0" style="fill:black;transform:translateY(-66px)" />

		<polygon class="p4" points="0,100 0,300 100,300 100,100 50,0" style="fill:white;transform:translateY(-33px)" />
		<polygon class="p5" points="0,100 0,300 100,300 100,100 50,0" style="fill:red;" />
		<polygon class="p6" points="0,100 0,300 100,300 100,100 50,0" style="fill:black;transform:translateY(33px)" />

		<polygon class="p7" points="0,100 0,300 100,300 100,100 50,0" style="fill:white;transform:translateY(66px)" />
		<polygon class="p8" points="0,100 0,300 100,300 100,100 50,0" style="fill:red;transform:translateY(100px)" />
		<polygon class="p9" points="0,100 0,300 100,300 100,100 50,0" style="fill:black;transform:translateY(133px)" />

		<polygon class="p10" points="0,100 0,300 100,300 100,100 50,0" style="fill:white;transform:translateY(166px)" />
		<polygon class="p11" points="0,100 0,300 100,300 100,100 50,0" style="fill:red;transform:translateY(200px)" />
		<polygon class="p12" points="0,100 0,300 100,300 100,100 50,0" style="fill:black;transform:translateY(233px)" />
		</g>
<!-- 	JACK -->
	<g id="jack">
		<g id="hair-bg" transform="matrix(.21216 0 0 .21216 -13.5 43)">
		<path id="b3" d="M307.1 1.8a2 2 0 01-2.5-2.9 3 3 0 012-1.4 3 3 0 012.1.4c.6.3 1.3 1 2 1.9 2.8 3.8 6.4 14 7.4 23.7.6 6.8 0 13.3-2.6 17.7A2 2 0 01312 39c2-3.3 2.4-8 2.2-13A61.7 61.7 0 00309 4.9c-.5-1.2-1.4-2.4-1.9-3z" transform="translate(18 28)"/>
		<path id="b4" d="M281.8-9a2 2 0 01-3.7-1.5c.6-2.4 1.8-3.3 2.7-3.6 1-.2 2 0 3 1 1.3 1.3 2.8 4.6 4 9 2.7 9.6 4.4 24.7 1.4 32.9a2 2 0 01-3.8-1.4c3-8.1.8-23.6-2-32.3-.5-1.7-1-3.2-1.6-4.2z" transform="translate(42 40)"/>
		</g>
		<g id="stationary" transform="matrix(.21216 0 0 .21216 -13.5 51.9)">
		<path id="left-arm" fill="#fff" d="M376.9 118c1.4 9.4-2.9 28 1.7 32.6 4.6 4.7 28.3 16 28.3 16l-22.3 6.8s-21.4.9-29-28c-3.6-14-2.7-47-2.7-47s22.5 10.4 24 19.7z"/>
		<path id="right-bicep" fill="#fff" d="M212.7 179c3.6 5.1 35.5-9.6 32.3-16.6-3.2-6.9 11-34.3 5.2-43.5-6-9.2-31.2-13-31.2-13s-10.3 3.5-10 18.2c.3 15.2-1 48.3 3.7 55z"/>
		<path id="head" fill="#fff" d="M266.1 43.4c4.5-3.2 8.2-11.6 9-16.5.7-5 1.5-32.5 10-34 8.4-1.5 42.6-6.1 45.8.8 3.1 7 6.8 23 3.1 29.8-3.7 6.9-6.3 15.8-12.4 19.9-6.2 4.1 2 12.6 2 12.6l-59-1s-2.9-8.4 1.5-11.6z"/>
		<path id="tshirt" fill="#ff0000" d="M209 124c-1.5-11 10-49.5 16-54s34.7-21.9 41.1-26.6c5.4 11.8 42.7 14.3 55.5 0 19.9 3.1 47.3 15.4 51.2 23.7 3.9 8.4 5.8 50.7 5.8 51 0 .3-20.8-2.2-21.1 6.6-.3 8.8 19.6 104.5 19.6 104.5l-128.6 11s5.2-102.7.8-114.5c-4.4-11.8-33.7-14.3-40.3-1.6z"/>
		<g id="guitar">
		<path id="guitar-body" fill="#ff2600" stroke="#fff" stroke-weight="1" d="M229 207.7c3.3-4.3 9.2-12.9 12.3-16.4 3-3.6 8-7.4 14.6-6.5 6.6.9 25.5 2.3 31.3 2.7 5.8.4 11.9-.2 18.3-8.7l26.3-34.7c4.9-6.4 15-5.5 15.4 3.7.3 9.3 1 14.3 1.1 21.3.1 7 5 9.5 10 8.1 5-1.3 4.2-1.1 5.6.9 1.4 2 7.9 13.9 9 15.9 1 2 .3 4-3.7 6.8s-14.6 12.1-11 19.7c1.6 3.5 4.9 6 7.8 8 3.4 2.5 6.1 5 5.2 6.7-2 4.2-8.8 9-25.8 11.5-17 2.6-25.3 19.7-33.8 28.6-8.5 8.8-20.2 29-28.3 28.7-8-.4-26.6-3.8-30.6-8.2a126.5 126.5 0 01-21.4-30.3c-2.9-6-6.4-15.3-9.8-17.8-3.3-2.6-13.3-9.5-5.6-22 4.2-6.8 11-15.4 13.1-18z"/>
		<path id="scratchplate" fill="#fff" d="M290 249.5c.7 5-1.5 16.3-15.5 24.6 5 4.5 4.1 11.8 2.8 15 16 .2 20.6-10.4 34.7-28.5 14.8-19 33-20.9 43.6-25.2 5.4-2.1-1.6-5.4-6.1-8.4s-5.5-4.7-6.1-7.6a17 17 0 004.5-3.2l-16.7-28.1-14.2 8.3 10.2 18.5-26.2 14.6-11.3-18.2-14.2 8.4 16.4 28.6-1.8 1.2z"/>
		<circle id="b4b" cx="269.6" cy="214.1" r="3.7" transform="translate(29 23.1) scale(.89385)"/>
		<circle id="b4s" cx="269.6" cy="214.1" r="3.7" fill="#a2b8c1" transform="translate(108 85.8) scale(.60071)"/>
		<circle id="b3b" cx="269.6" cy="214.1" r="3.7" transform="translate(39.1 17) scale(.89385)"/>
		<circle id="b3s" cx="269.6" cy="214.1" r="3.7" fill="#a2b8c1" transform="translate(118 79.6) scale(.60071)"/>
		<circle id="b2b" cx="269.6" cy="214.1" r="3.7" transform="translate(59 6) scale(.89385)"/>
		<circle id="b2s" cx="269.6" cy="214.1" r="3.7" fill="#a2b8c1" transform="translate(137.9 68.7) scale(.60071)"/>
		<circle id="b1b" cx="269.6" cy="214.1" r="3.7" transform="translate(69 1) scale(.89385)"/>
		<circle id="b1s" cx="269.6" cy="214.1" r="3.7" fill="#a2b8c1" stroke="#000" stroke-width="1.1" transform="translate(147.8 63.6) scale(.60071)"/>
		<path id="switch-plate" fill="#fff" d="M316 182.8c1.5-.9 15.2-9 16.8-9.8 1.5-.7 5.4-.7 7.1 2.2 1.7 2.9.2 6-1.1 6.9-1.4.8-15.2 9.1-16.6 10.1-1.5 1-6 .2-7.2-2.2-1.3-2.5-1.1-5.8 1-7.2z"/>
		<path id="switch-detail" fill="#a2b8c1" d="M333 174.4c1.2-.5 2.5-1.3 3.4 0 .9 1.2-1.4 1.4-.2 3.2 1.2 1.8 2.3.6 2.8 1.4.5.9-.2 1.7-.8 2.2-.6.5-16 9.3-17 9.8-1 .6-2.2.4-2.5-.5-.4-.8.8-1.7.3-2.9s-2.6-1-3-2c-.4-.8.4-1.6 1-2l16-9.2z"/>
		<path id="bridge" fill="#a2b8c1" d="M267.6 227.4c-1.7-3 2.8-5.6 4.7-2.4 1.8 3.2 12.6 20.4 14.3 23 2.3 3.5-2 6.4-4.2 2.9a1026 1026 0 01-14.8-23.5z"/>
		<path id="humbucker2" fill="#a2b8c1" d="M279.2 222.4l11.8-6.6 11.8 21-11.4 7-12.2-21.4z"/>
		<path id="humbucker1" fill="#a2b8c1" d="M332 192.6l12.5 21.2-12 6-12-21 11.6-6.2z"/>
		<path id="stock" fill="#fff" d="M531.2 101.2c2 1 7 5.6.2 8a250 250 0 00-33.2 16c-2.6 1.7-2.6.5-4.3.5-1.8 0-7.4-.3-10.6 1.6-3.3 2-7.6-11.5-7.6-11.5 4.9-4.7 3.3-8 4.8-8.8a181.8 181.8 0 0024-16c2.7-2.4 4.4-1.7 6.4-.5 2.1 1.3 19.3 10.3 20.3 10.7z"/>
		<path id="fret-board" d="M335.7 192.6l140-76.8 7.6 11.5L345.9 210l-10.2-17.4z"/>
		</g>
		<path id="left-hand" fill="#fff" d="M399.4 157.2c-.2-4 1.7-7.8 5-4.4-1.9-6.1 2.4-8 4-5.4-.5-5.6 3.8-6.6 5.4-3.6.2-3.8 3.5-5.4 5.7-2 2.2 3.3 12.2 16.8 9.6 22.3-2.6 5.7-15.1 13.6-20.3 14.8a105 105 0 01-15 1.7s12.5-9 13.1-9c-2-3.8-7.4-10.7-7.5-14.4z"/>
		</g>
		<path id="right-forearm" fill="#fff" d="M212.7 179c3.6 5.1 64.6 29.4 65.4 31 .8 1.6 28.7 23.4 33.3 15.9 4.7-7.5 17.4-25 8.1-26.4-9.3-1.4-30-5.2-39.4-12-9.5-6.7-32-18.1-35.1-25-3.2-7-37 10-32.3 16.6z" transform="matrix(.21216 0 0 .21216 -13.5 51.9)"/>
		<g id="hair-fg" transform="matrix(.21216 0 0 .21216 -13.5 43)">
    <path id="_1" d="M320.2-15c-1.7.2-3.2 1-4.7 2.2a21.2 21.2 0 00-4.9 7.4c-5 11.6-6.5 31.6-3.5 40.2a2 2 0 003.8-1.3c-2.8-8-1.2-26.6 3.4-37.3 1-2.2 2-4 3.2-5.3 1-1 2-1.8 3-1.9a2 2 0 00-.3-4z" transform="translate(6 44)"/>
    <path id="_2" d="M337.4 2l-.4.3a24.6 24.6 0 00-3.4 6.5 97.7 97.7 0 00-4.6 25c-.2 5.3 0 9.9 1.2 12.5a2 2 0 01-3.6 1.7c-1-2.3-1.6-6-1.6-10.2-.1-9.4 2-22.1 4.9-30.4 1.3-3.8 3-6.7 4.5-8.1 1-1 2.1-1.4 3.2-1.3a2 2 0 01-.2 4z" transform="translate(-16 30)"/>
    <path id="_3" d="M320-13.4a6 6 0 00-5 1.5 18.6 18.6 0 00-4.6 7.6c-3.2 8.6-4.8 22-4.2 31.5a25 25 0 002.2 9.8 2 2 0 003.5-2 20 20 0 01-1.6-7.5c-.4-5.4 0-12.3 1-18.8A45 45 0 01316-6.9c.5-.8 1-1.4 1.5-1.9.6-.5 1.2-.7 1.8-.6a2 2 0 00.7-4z" transform="translate(0 40)"/>
    <path id="_4" d="M313.2-15a8 8 0 00-6.6 2.8c-1.6 1.7-3 4.2-4 7.1a90.2 90.2 0 00-2 43 2 2 0 003.9-1.3 84.8 84.8 0 011.9-40.3c.8-2.4 1.8-4.4 3.1-5.7 1-1 2.1-1.7 3.5-1.6a2 2 0 00.2-4z" transform="translate(4 40)"/>
    <path id="_5" d="M313.2-15a8 8 0 00-6.6 3 21.9 21.9 0 00-4 7.4c-3 9.2-3.9 23.4-3.3 32.3a25 25 0 001.5 8.6 2 2 0 003.5-2c-.5-1-.8-3.5-1-6.8-.6-8.6.2-22 3.2-30.8a18 18 0 013-6c1-1.1 2.1-1.8 3.5-1.7a2 2 0 00.2-4z" transform="translate(0 40)"/>
    <path id="_6" d="M308-16c-1.7 0-3.4.9-4.8 2.5-1.7 1.9-3.1 5-4.3 8.7-2.8 9.5-3.9 23.6-3.5 32.5a24 24 0 001.4 8.6 2 2 0 003.5-2c-.5-1-.8-3.5-.9-6.8-.3-8.5.6-22 3.4-31.2.8-2.6 1.7-4.8 2.8-6.4.8-1 1.5-1.9 2.6-2a2 2 0 00-.2-4z" transform="translate(0 40)"/>
    <path id="_7" d="M313.2-15a8 8 0 00-6.6 2.8c-1.6 1.7-3 4.2-4 7.1a90.2 90.2 0 00-2 43 2 2 0 003.9-1.3 84.8 84.8 0 011.9-40.3c.8-2.4 1.8-4.4 3.1-5.7 1-1 2.1-1.7 3.5-1.6a2 2 0 00.2-4z" transform="translate(-7 40)"/>
    <path id="_8" d="M287.2-15.9c-3.4 1.5-7 5.1-9.5 11.4-3.5 8.7-5.2 22.7-1.9 43a2 2 0 004-.7C276.6 18.6 278 5.2 281.4-3c2-5 4.7-8 7.4-9.2a2 2 0 00-1.6-3.7z" transform="translate(15 40)"/>
    <path id="_9" d="M307.9-16a6.8 6.8 0 00-4.6 2.9c-1.6 2-3 5.1-4 9a132 132 0 00-3.2 33.4c0 4.1.5 7.3 1 8.6a2 2 0 003.7-1.5 28 28 0 01-.7-7.3c-.3-8.8.5-22.7 3-32.2a26 26 0 012.7-6.7c.8-1.2 1.5-2.1 2.5-2.2a2 2 0 00-.4-4z" transform="translate(-10 40)"/>
    <path id="_10" d="M307.9-16a9.3 9.3 0 00-6.6 4c-1.5 2-2.7 4.8-3.6 8-4 14.3-2.2 37.8-.6 41.9a2 2 0 003.7-1.5 101.3 101.3 0 01.7-39.3c.8-2.7 1.8-5 3-6.7 1-1.4 2.3-2.3 3.8-2.4a2 2 0 00-.4-4z" transform="translate(-12 40)"/>
    <path id="_11" d="M289.3-15.1C285-8.4 277 2 281.8 37.4a2 2 0 004-.5c-4.6-33.5 2.8-43.5 6.9-49.8a2 2 0 00-3.4-2.2z" transform="translate(0 40)"/>
    <path id="_12" d="M287.3-15.1C283-8.4 275 3.1 279.8 38.4a2 2 0 004-.5c-4.6-33.6 2.8-44.5 6.9-50.8a2 2 0 00-3.4-2.2z" transform="translate(0 40)"/>
    <path id="_13" d="M288.2-15.9c-3.4 1.5-7 4.9-9.6 11-3.7 8.3-5.7 22.1-2.8 43.3a2 2 0 004-.5c-2.8-20.2-1-33.3 2.4-41.3 2.2-4.8 4.9-7.6 7.6-8.8a2 2 0 00-1.6-3.7z" transform="translate(0 40)"/>
    <path id="_14" d="M287.9-16c-4.9-.4-9 2-11.7 8-3.7 8-5.3 22.6-4.3 45.7a2 2 0 004-.2c-1-22.1.4-36.2 3.9-43.7 1.9-4.2 4.4-6 7.8-5.8a2 2 0 00.3-4z" transform="translate(0 40)"/>
    <path id="_15" d="M286.9-16c-5.9-.5-11.4 2.2-15 10.9-3.3 7.7-5 20.6-4 40.8a2 2 0 004-.2c-1-19.4.6-31.7 3.7-39 2.7-6.6 6.6-8.9 11-8.5a2 2 0 00.3-4z" transform="translate(0 40)"/>
    <path id="_16" d="M286.9-16c-10.8-.9-26 6.8-22 49.8a2 2 0 004-.4 79.3 79.3 0 012.3-33.7c3.5-9.8 10-12.2 15.4-11.7a2 2 0 00.3-4z" transform="translate(0 40)"/>
    <path id="b1" d="M330.1-8.3a2 2 0 01-2.4-3.2c1.5-1.3 3.8-1.3 6 1a33 33 0 016.6 12.6 41.4 41.4 0 01-.7 28.5 2 2 0 01-3.7-1.7c5.5-12 1.1-27.4-3.3-34.3-.7-1-1.3-2-2-2.5l-.5-.4z" transform="translate(-1 40)"/>
    <path id="b2" d="M317.5-9.5v.2a2 2 0 01-3.8-1.4c.8-2.4 2.2-3.1 3.5-3.1a4 4 0 012.6 1c.8.7 1.7 1.8 2.6 3.3 3 5 5.9 14.8 6.3 23.6.2 6.2-.8 11.8-3.8 15.3a2 2 0 01-3-2.6c2.4-2.8 3-7.5 2.8-12.6-.4-8-3-17-5.8-21.7a11.2 11.2 0 00-1.4-2z" transform="translate(11 40)"/>
  </g>
	</g>
</svg>
              
            
!

CSS

              
                * {
	padding: 0;
	margin: 0;
}
body {
	background: #000;
}
svg {
	max-width: 100vw;
	max-height: 100vw;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	overflow: hidden;
}
              
            
!

JS

              
                (function(){
	let width = window.innerWidth;
	let height = window.innerHeight;
	let viewportSize = width > height ? '100vh':'100vw';
	
	let triangleSpeed = 2;
	let rockSpeed = triangleSpeed/6;
	gsap.to("#polygons", {duration: triangleSpeed, ease:"none", y: -100, repeat: -1});
	
	gsap.to('#right-forearm',{duration: rockSpeed, rotation:-20,yoyo:true, repeat: -1})
	
	gsap.from('#_1',{duration: rockSpeed, y:47,yoyo:true, repeat: -1}) //44
	gsap.from('#_2',{duration: rockSpeed, y:33,yoyo:true, repeat: -1}) //30
	gsap.from('#_3',{duration: rockSpeed, y:45,yoyo:true, repeat: -1}) //40
	gsap.from('#_4',{duration: rockSpeed, y:45,yoyo:true, repeat: -1}) //40
	gsap.from('#_5',{duration: rockSpeed, y:44.5,yoyo:true, repeat: -1}) //40
	gsap.from('#_6',{duration: rockSpeed, y:44.5,yoyo:true, repeat: -1}) //40
	gsap.from('#_7',{duration: rockSpeed, y:44,yoyo:true, repeat: -1}) //40
	gsap.from('#_8',{duration: rockSpeed, y:43.5,yoyo:true, repeat: -1}) //40
	gsap.from('#_9',{duration: rockSpeed, y:43.5,yoyo:true, repeat: -1}) //40
	gsap.from('#_10',{duration: rockSpeed, y:43,yoyo:true, repeat: -1}) //40
	gsap.from('#_11',{duration: rockSpeed, y:42.5,yoyo:true, repeat: -1}) //40
	gsap.from('#_12',{duration: rockSpeed, y:42,yoyo:true, repeat: -1}) //40
	gsap.from('#_13',{duration: rockSpeed, y:42.5,yoyo:true, repeat: -1}) //40
	gsap.from('#_14',{duration: rockSpeed, y:42,yoyo:true, repeat: -1}) //40
	gsap.from('#_15',{duration: rockSpeed, y:42.5,yoyo:true, repeat: -1}) //40
	gsap.from('#_16',{duration: rockSpeed, y:42,yoyo:true, repeat: -1}) //40
	
	gsap.from('#b1',{duration: rockSpeed, y:45,yoyo:true, repeat: -1}) //40
	gsap.from('#b2',{duration: rockSpeed, y:45,yoyo:true, repeat: -1}) //40
	gsap.from('#b3',{duration: rockSpeed, y:33,yoyo:true, repeat: -1}) //28
	gsap.from('#b4',{duration: rockSpeed, y:44,yoyo:true, repeat: -1}) //40
})()
              
            
!
999px

Console