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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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="container">
  <h1>Baymax in Pure CSS</h1>
  <div class="baymax-central">
    <div class="baymax-leftarm">
      <div class="baymax-highlight"></div>
      <div class="baymax-arm-patch"></div>
    </div>
    <div class="baymax-rightarm">
      <div class="baymax-highlight"></div>
      <div class="baymax-arm-patch"></div>
    </div>
    <div class="baymax-leftleg">
      <div class="baymax-highlight"></div>
      <div class="baymax-leg-sidepatch"></div>
      <div class="baymax-leg-footpatch"></div>
    </div>
    <div class="baymax-rightleg">
      <div class="baymax-highlight"></div>
      <div class="baymax-leg-sidepatch"></div>
      <div class="baymax-leg-footpatch"></div>
    </div>
    <div class="baymax-body">
      <div class="baymax-highlight"></div>
      <div class="baymax-heart"></div>
    </div>
    <div class="baymax-head">
      <div class="baymax-highlight"></div>
      <div class="baymax-eyes"></div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                @import "compass";

$central-height: 180px;
$central-width: 124px;

$baymax-border: 1px;
$baymax-border-color: #EAEAEA;
$baymax-border-total: $baymax-border * 2;

$baymax-color: whitesmoke;
$baymax-highlight: #FFFFFF;
$baymax-shadow: #CCCCCC;
$baymax-patch-color: #efe7e7;

.baymax-central {
	position: relative;
	width: $central-width + $baymax-border-total;
	height: $central-height;
	margin: 50px auto;
}

.baymax-patch {
	content: "";
	position: absolute;
	background: $baymax-patch-color;
	border-radius: 50%;
	border: 1px solid #EAEAEA;
}

$baymax-body-shadow: inset 0px -30px 50px 0px rgba($baymax-shadow,0.5);

.baymax-body {
	position: relative;
	overflow: hidden;
	display: block;
	width: $central-width;
	height: $central-height;
	background-color: $baymax-color;
	border: $baymax-border solid $baymax-border-color;
	-webkit-border-radius: 50%  50%  50%  50%  / 60%   60%  40%  40%;
	border-radius: 50%  50%  50%  50%  / 60%   60%  40%  40%;
	-webkit-box-shadow: $baymax-body-shadow;
	-moz-box-shadow: $baymax-body-shadow;
	box-shadow: $baymax-body-shadow;

	$baymax-body-patch-shadow: 0px 0px 5px 0px rgba($baymax-shadow,0.5);
  
	&:before,
	&:after {
		@extend .baymax-patch;
		top: 55px;
		width: 15px;
		height: 40px;
		-webkit-box-shadow: $baymax-body-patch-shadow;
		-moz-box-shadow: $baymax-body-patch-shadow;
		box-shadow: $baymax-body-patch-shadow;
	}

	$shadow-rotate: 15deg;
	$shadow-offset: -8px;

	&:before {
		left: $shadow-offset;
		-ms-transform: rotate($shadow-rotate);
		-webkit-transform: rotate($shadow-rotate); 
		transform: rotate($shadow-rotate);
	}

	&:after {
		right: $shadow-offset;
		-ms-transform: rotate(-$shadow-rotate);
		-webkit-transform: rotate(-$shadow-rotate); 
		transform: rotate(-$shadow-rotate);
	}

	.baymax-heart {
		position: absolute;
		top: 35px;
		right: 30%;
		height: 12px;
		width: 12px;
		border: $baymax-border solid $baymax-border-color;
		background: $baymax-color;
		border-radius: 50%;
	}

	$baymax-body-highlight: 0 0 45px 25px rgba($baymax-highlight,1);

	.baymax-highlight {
		position: absolute;
		top: 20%;
		right: 40%;
		width: 0%;
		height: 50%;
		background: $baymax-highlight;
		-webkit-box-shadow: $baymax-body-highlight;
		-moz-box-shadow: $baymax-body-highlight;
		box-shadow: $baymax-body-highlight;
		border-radius: 50%;
	}
}

$baymax-head-width: 42px;
$baymax-head-outer-shadow: 0 6px 8px -5px rgba(darken($baymax-shadow,30%), 0.75);
$baymax-head-inner-shadow: inset 0 -6px 8px -5px rgba($baymax-shadow, 0.5);

.baymax-head {
	background: $baymax-color;
	height: 28px;
	width: $baymax-head-width;
	position: absolute;
	top: -18px;
	left: 50%;
	margin-left: -($baymax-head-width / 2);
	border: $baymax-border solid $baymax-border-color;
	border-radius: 40px / 25px;
	-webkit-box-shadow: $baymax-head-outer-shadow, $baymax-head-inner-shadow;
	-moz-box-shadow: $baymax-head-outer-shadow, $baymax-head-inner-shadow;
	box-shadow: $baymax-head-outer-shadow, $baymax-head-inner-shadow;
	overflow: hidden;
	-ms-transform: rotate(5deg);
	-webkit-transform: rotate(5deg); 
	transform: rotate(5deg);

	$eyes-width: 20px;
	$eyes-size: 6px;
	$eyes-color: #333333;

	.baymax-eyes {
		position: relative;
		top: 10px;
		left: 50%;
		margin-left: -($eyes-width / 2);
		height: 1px;
		width: $eyes-width;
		background: $eyes-color;

		&:before,
		&:after {
			content: "";
			position: absolute;
			top: -3px;
			background: $eyes-color;
			height: $eyes-size;
			width: $eyes-size;
			border-radius: 100%;
		}

		$eyes-offset: -2px;

		&:before {
			left: $eyes-offset;
		}

		&:after {
			right: $eyes-offset;
		}
	}

	$baymax-head-highlight: 0 0 18px 9px rgba($baymax-highlight,1);

	.baymax-highlight {
		position: absolute;
		top: 12%;
		right: 25%;
		width: 45%;
		height: 1%;
		border-radius: 50%;
		background: $baymax-highlight;
		-webkit-box-shadow: $baymax-head-highlight;
		-moz-box-shadow: $baymax-head-highlight;
		box-shadow: $baymax-head-highlight;
	}
}

.baymax-leftarm,
.baymax-rightarm {
	position: absolute;
	top: 5px;
	height: 145px;
	width: 40px;
	background-color: $baymax-color;
	border: $baymax-border solid $baymax-border-color;
	overflow: hidden;

	$arm-shadow: 0px 0px 30px 0px rgba(darken($baymax-shadow,30%),1);

	&:after {
		content: "";
		position: absolute;
		top: 40px;
		height: 80px;
		width: 20px;
		background: $baymax-color;
		-webkit-box-shadow: $arm-shadow;
		-moz-box-shadow: $arm-shadow;
		box-shadow: $arm-shadow;
		z-index: 1;
	}

	$baymax-arm-highlight: 0 0 16px 7px rgba($baymax-highlight,0.8);

	.baymax-highlight {
		position: absolute;
		top: 25%;
		width: 1%;
		height: 65%;
		border-radius: 50%;
		background: $baymax-highlight;
		-webkit-box-shadow: $baymax-arm-highlight;
		-moz-box-shadow: $baymax-arm-highlight;
		box-shadow: $baymax-arm-highlight;
		z-index: 2;
	}

	.baymax-arm-patch {
		@extend .baymax-patch;
		top: 60px;
		height: 50px;
		width: 25px;
	}
}

$arm-rotate: 25deg;
$arm-offset: -25px;
$arm-shadow-rotate: 15deg;
$arm-shadow-offset: -13px;
$arm-highlight-offset: 30%;
$arm-patch-offset: -20px;

.baymax-leftarm {
	left: $arm-offset;
	-ms-transform: rotate($arm-rotate);
	-webkit-transform: rotate($arm-rotate); 
	transform: rotate($arm-rotate);
	border-radius: 90px 20px 20px 90px / 200px 40px 40px 200px;

	&:after {
		right: $arm-shadow-offset;
		border-radius: 30px 10px 10px 90px / 90px 10px 10px 200px;
		-ms-transform: rotate(-$arm-shadow-rotate);
		-webkit-transform: rotate(-$arm-shadow-rotate); 
		transform: rotate(-$arm-shadow-rotate);
	}

	.baymax-highlight {
		left: $arm-highlight-offset;
	}

	.baymax-arm-patch {
		left: $arm-patch-offset;
	}
}

.baymax-rightarm {
	right: $arm-offset;
	-ms-transform: rotate(-$arm-rotate);
	-webkit-transform: rotate(-$arm-rotate); 
	transform: rotate(-$arm-rotate);
	border-radius: 20px 90px 90px 20px / 40px 200px 200px 40px;

	&:after {
		left: $arm-shadow-offset;
		border-radius: 10px 30px 90px 10px / 10px 90px 200px 10px;
		-ms-transform: rotate($arm-shadow-rotate);
		-webkit-transform: rotate($arm-shadow-rotate); 
		transform: rotate($arm-shadow-rotate);
	}

	.baymax-highlight {
		right: $arm-highlight-offset;
	}

	.baymax-arm-patch {
		right: $arm-patch-offset;
	}
}

$baymax-leg-width: 48px;
$baymax-leg-height: 85px;

.baymax-rightleg,
.baymax-leftleg {
	position: absolute;
	bottom: -48px;
	width: $baymax-leg-width;
	height: $baymax-leg-height;
	background: $baymax-color;
	border: $baymax-border solid $baymax-border-color;
	overflow: hidden;
	z-index: 0;

	$leg-shadow: inset 0px 0px 15px 0px rgba($baymax-shadow,1);

	&:after {
		content: "";
		position: absolute;
		top: 0;
		width: $baymax-leg-width;
		height: $baymax-leg-height;
		-webkit-box-shadow: $leg-shadow;
		-moz-box-shadow: $leg-shadow;
		box-shadow: $leg-shadow;
	}

	$baymax-arm-highlight: 0 0 16px 7px rgba($baymax-highlight,0.8);

	.baymax-highlight {
		position: absolute;
		top: 40%;
		width: 1%;
		height: 38%;
		border-radius: 50%;
		background: $baymax-highlight;
		-webkit-box-shadow: $baymax-arm-highlight;
		-moz-box-shadow: $baymax-arm-highlight;
		box-shadow: $baymax-arm-highlight;
		z-index: 2;
	}

	.baymax-leg-sidepatch,
	.baymax-leg-footpatch {
		@extend .baymax-patch;
		background: lighten($baymax-patch-color, 3%);
		z-index: 1;
	}

	.baymax-leg-sidepatch {
		top: -50px;
		height: 100px;
		width: 30px;
	}

	.baymax-leg-footpatch {
		bottom: -22px;
		height: 30px;
		width: 60px;
	}
}

$leg-offset: 13px;
$leg-sidepatch-offset: -20px;
$leg-footpatch-offset: 5px;
$leg-footpatch-offset: 0;
$leg-highlight-offset: 20px;
$leg-highlight-rotate: 5deg;

.baymax-leftleg {
	left: $leg-offset;
	border-radius: 20% 0 30% 50% / 50% 0 30% 50%;

	.baymax-leg-sidepatch {
		left: $leg-sidepatch-offset;
	}

	.baymax-leg-footpatch {
		left: $leg-footpatch-offset;
	}

	.baymax-highlight {
		left: $leg-highlight-offset + 5;
		-ms-transform: rotate(-$leg-highlight-rotate);
		-webkit-transform: rotate(-$leg-highlight-rotate); 
		transform: rotate(-$leg-highlight-rotate);
	}
}

.baymax-rightleg {
	right: $leg-offset;
	border-radius: 0 20% 50% 30% / 0 50% 50% 30%;

	.baymax-leg-sidepatch {
		right: $leg-sidepatch-offset;
	}

	.baymax-leg-footpatch {
		right: $leg-footpatch-offset;
	}

	.baymax-highlight {
		right: $leg-highlight-offset;
		-ms-transform: rotate($leg-highlight-rotate);
		-webkit-transform: rotate($leg-highlight-rotate); 
		transform: rotate($leg-highlight-rotate);
	}
}

body {
  background-color: #e8e7ea;
  @include filter-gradient(#e8e7ea, #95a6ba, horizontal);
  @include background-image(radial-gradient(center, ellipse cover,  #e8e7ea 0%,#95a6ba 100%));

}

.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 30px;
	
	h1 {
		font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; 
		font-weight: 100;
		letter-spacing: 0.5px;
		font-size: 40px;
		margin: 20px auto;
		text-align: center;
		color: #666666;
	}
}
              
            
!

JS

              
                
              
            
!
999px

Console