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

              
                <h1>CSS Stickman Seesaw Acrobats</h1>
<div class="seesaw">
	<div class="seesaw-top">
		<div class="man manleft">
			<div class="man-upper">
				<div class="man-lower"></div>
			</div>
		</div>
		<div class="loadbox">LOADING</div>
		<div class="man manright">
			<div class="man-upper">
				<div class="man-lower"></div>
			</div>
		</div>
	</div>
	<div class="seesaw-bottom"></div>
</div>
<br><br>
<!--<form oninput="amount.value=weight.value+'%'">
    <label for "weight">Size: </label>
    <input type="range" id="weight" min="30" value="50" max="100" step="1"><output name="amount" for="weight">50%</output>
 </form>-->
<h2>Could be uses as preloader GFX. (Try hovering over the seesaw)</h2>
<br><br>
<h2>Like it? - Check out my other <a href="https://codepen.io/pmk/popular/">Pens</a></h2>
              
            
!

CSS

              
                $timingFactor: 2;
$jumpHeight: 15em;
$manColor: #555;
$seesawColor: #555;
$seesawBasecolor: #666;

body {
  font: 100%/1.2 Arial;
  background-color: #ddd;
}
h1 {
  color: rgb(209, 101, 0);
  text-align: center;
  text-shadow: .05em .05em .06em rgba(0, 0, 0, .7);
  font-size: 6vmin;
  margin: .2em 0;
}
h2 {
  text-align: center;
  font-size: .9em;
  color: #444;
}
form {
	display: block;
	margin: 0 auto;
	width: 18em;
}

.man {
	position: relative;
	width: 3.7em;
	height: 6.5em;
	transform-origin: 40% center;
}
.manleft {
	animation: manleft-jump (1s * $timingFactor) linear infinite;
	float: left;
}
.manright {
	animation: manright-jump (1s * $timingFactor) linear infinite;
	float: right;
}
.man-upper {
	/* Head */
	display: block;
	position: relative;
	width: 1.5em;
	height: 1.5em;
	border: 2px solid $manColor;
	border-radius: 50%;
	margin: 0 1em;
}
.man-upper:before, .man-upper:after {
	/* Arms */
	position: absolute;
	content: "";
	width: 2.5em;
	height: 0;
	border: 1px solid $manColor;
	top: 1.75em;
	left: 50%;
	transform-origin: top center;
	animation: none (1s * $timingFactor) linear infinite;
}
.manright .man-upper:before, .manright .man-upper:after {
	animation-delay: (.5s * $timingFactor);
}
.man-upper:before {
	/* Arm Left */
	transform-origin: left center;
	transform: rotate(135deg);
	animation-name: man-left-arm;
}
.man-upper:after {
	/* Arm Right */
	transform-origin: left center;
	transform: rotate(45deg);
	animation-name: man-right-arm;
}
.man-lower {
	/* Body */
	display: block;
	position: absolute;
	width: 0;
	height: 2em;
	border: 1px solid $manColor;
	left: 50%;
	top: 1.5em;
}

.man-lower:before, .man-lower:after {
	/* Legs */
	position: absolute;
	content: "";
	width: 3em;
	height: 0;
	border: 1px solid $manColor;
	bottom: -1px;
	left: 50%;
	transform-origin: top center;
	animation: none (1s * $timingFactor) linear infinite;
}
.manright .man-lower:before, .manright .man-lower:after {
	animation-delay: (.5s * $timingFactor);
}
.man-lower:before {
	/* Leg Left */
	transform-origin: left center;
	transform: rotate(115deg);
	animation-name: man-left-leg;
}
.man-lower:after {
	/* Leg Right */
	transform-origin: left center;
	transform: rotate(65deg);
	animation-name: man-right-leg;
}


/* seesaw */
.seesaw {
	display: block;
	position: relative;
	width: 18em;
	height: auto;
	margin: 16em auto 0 auto;
    font-size: 60%; /* Change this to scale all */
}
.seesaw-top {
	display: block;
	position: relative;
	width: 18em;
	height: auto;
	border-bottom: 2px solid $seesawColor;
	top: 0;
	transform-origin: bottom center;
	animation: animate-seesaw (1s * $timingFactor) ease-in-out infinite;
}
.seesaw-top:after {
     display: block;
     content: "";
     clear: both;
}
.seesaw-bottom {
	display: block;
	position: relative;
	width: 3em;
	height: 3em;
	left: 50%;
	transform-origin: bottom center;
}
.seesaw-bottom:before, .seesaw-bottom:after {
	margin-left: -50%;
	position: absolute;
	content: "";
	width: 3em;
	height: 0;
	border: 1px solid $seesawBasecolor;
	top: 0;
	left: 50%;
	transform-origin: top left;
}
.seesaw-bottom:before {
	transform: rotate(115deg);
}
.seesaw-bottom:after {
	transform: rotate(65deg);
}

.loadbox {
	display: none;
 	position: absolute;
	border: 1px solid black;
	bottom: -1px;
	background: #444;
	color: #eee;
	font: normal 1em/1.2 Arial;
	text-align: center;
	width: 5em;
	padding: .2em;
	animation: animate-loadbox (1s * $timingFactor) ease-in-out infinite;
}
.seesaw:hover .loadbox {
	display: block;
}
@keyframes animate-seesaw {
    0% {
    		transform: rotate(20deg);
	}
    10% {
    		transform: rotate(-20deg);
	}
    50% {
    		transform: rotate(-20deg);
	}
    60% {
    		transform: rotate(20deg);
	}
    100% {
    		transform: rotate(20deg);
	}
}
@keyframes manleft-jump {
    0% {
    		transform:  translateY(0px);
	}
    50% {
    		transform: translateY(0px) rotate(0deg);
	}
    65% {
    		transform: rotate(-20deg) translateY(- $jumpHeight) rotate(180deg);
	}
    100% {
    		transform: rotate(0deg) translateY(0px) rotate(360deg);
	}
}
@keyframes manright-jump {
    0% {
    		transform: translateY(0px) rotate(0deg);
	}
    15% {
    		transform: rotate(20deg) translateY(- $jumpHeight) rotate(-180deg);
	}
    50% {
    		transform: rotate(0deg) translateY(0px) rotate(-360deg);
	}
    100% {
    		transform: translateY(0px) rotate(-360deg);
	}
}

@keyframes man-left-arm {
    0% {
    		transform: rotate(135deg);
	}
    50% {
    		transform: rotate(135deg);
	}
    60% {
    		transform: rotate(210deg);
	}
    80% {
    		transform: rotate(210deg);
	}
    100% {
    		transform: rotate(135deg);
	}
}

@keyframes man-right-arm {
    0% {
    		transform: rotate(45deg);
	}
    50% {
    		transform: rotate(45deg);
	}
    60% {
    		transform: rotate(-30deg);
	}
    80% {
    		transform: rotate(-30deg);
	}
    100% {
    		transform: rotate(45deg);
	}
}
@keyframes man-left-leg {
    0% {
    		transform: rotate(115deg);
	}
    50% {
    		transform: rotate(115deg);
	}
    60% {
    		transform: rotate(160deg);
	}
    80% {
    		transform: rotate(160deg);
	}
    100% {
    		transform: rotate(115deg);
	}
}

@keyframes man-right-leg {
    0% {
    		transform: rotate(65deg);
	}
    50% {
    		transform: rotate(65deg);
	}
    60% {
    		transform: rotate(20deg);
	}
    80% {
    		transform: rotate(20deg);
	}
    100% {
    		transform: rotate(65deg);
	}
}

@keyframes animate-loadbox {
    0% {
    		left: 45%;
	}
    10% {
    		left: 45%;
	}
    50% {
    		left: 25%;
	}
    60% {
    		left: 25%;
	}
    100% {
    		left: 45%;
	}
}

              
            
!

JS

              
                jQuery( document ).ready(function( $ ) {
	$('#weight').on('change input',function(e) {
		$('.seesaw').css('font-size',$(this).val()+'%');
	})
});
              
            
!
999px

Console