cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <div class="description-bottom">
	<h1>Daily CSS Images: Day 12</h2>
	<h2>Christian Valentin</h2>
	<h3>Fast Food</h3>
	<h4><a href="https://dribbble.com/shots/3149724-Drive-Food">Based in a design by Eto</a></h4>
</div>

<div class="draw">
	<div class="hamburguer">
		<div class="bread-top">
			<div class="mark"></div>
			<div class="mark"></div>
			<div class="mark"></div>
			<div class="mark"></div>
			<div class="speed"></div>
		</div>
		<div class="ingredients">
			<div class="ing1">
				<div class="speed"></div>
			</div>
			<div class="ing2"></div>
			<div class="ing3"></div>
			<div class="ing4">
				<div class="speed"></div>
			</div>
		</div>
		<div class="bread-bottom">
			<div class="speed"></div>
			<div class="wheel"></div>
			<div class="wheel"></div>
		</div>
	</div>
</div>
            
          
!
            
              .draw {margin-top: 40px;}

$size-basis: 120px;

.hamburguer {
	@include animation(run, 3s, ease, 1s, infinite);
	
	$mark-color: #fbdbad; 
	$bread-main-color: #e8bd88; 
	$bread-shadow-color: #d4a57b; 
	$green-main-color: #66823a; 
	$green-shadow-color: #5c782c; 
	$brown-main-color: #6b461c; 
	$brown-shadow-color: #60411a; 
	$yellow-main-color: #d7a335; 
	$yellow-shadow-color: #c58f2c; 
	$red-color: #b11010;
	$black: #2b2b2b;
	
	.bread-top {
		@include animation(run, 3s, ease, 1.5s, infinite);
		@include bdrds(100% 100% 30% 30%);
		background: linear-gradient(to bottom, $bread-main-color 0%, $bread-main-color 70%, $bread-shadow-color 70%, $bread-shadow-color 100%);
		width: $size-basis;
		height: ($size-basis / 2);
		
		.mark {
			position: absolute;
			$height: ($size-basis * (5 / 100));
			height: $height;
			width: ($size-basis * (10 / 100));
			background: $mark-color;
			
			@include pseudo() {
				@include bdrds();
				background: $mark-color;
				height: $height;
				width: $height;
			}
			&:before {
				@include trsf(translateX(-50%));
				left: 0;
			}
			&:after {
				@include trsf(translateX(50%));
				right: 0;
			}
			
			&:nth-child(1) {
				top: ($size-basis * (10 / 100));
				left: ($size-basis * (30 / 100));
				width: ($size-basis * (10 / 100));
			}
			&:nth-child(2) {
				top: ($size-basis * (40 / 100));
				right: ($size-basis * (30 / 100));
				width: ($size-basis * (7 / 100));
			}
			&:nth-child(3) {
				top: ($size-basis * (35 / 100));
				left: ($size-basis * (20 / 100));
				width: ($size-basis * (5 / 100));
			}
			&:nth-child(4) {
				top: ($size-basis * (20 / 100));
				right: ($size-basis * (10 / 100));
				width: ($size-basis * (5 / 100));
			}
		}
		.speed {
			left: -($size-basis * (5 / 100));
			top: 50%;
		}
	}
	.ingredients {
		[class*=ing] {
			width: ($size-basis * (70 / 100));
			height: ($size-basis * (30 / 100));
			margin: ($size-basis * (2 / 100)) auto;
			@include pseudo() {
				height: ($size-basis * (30 / 100));
				width: ($size-basis * (30 / 100));
				@include bdrds();
			}
			&:before {
				left: -($size-basis * (15 / 100));
			}
			&:after {
				right: -($size-basis * (15 / 100));
			}
		}
		.ing1 {
			@include animation(run, 3s, ease, 1.4s, infinite);
			background: linear-gradient(to bottom, $green-main-color 0%, $green-main-color 50%, $green-shadow-color 50%, $green-shadow-color 100%);
			@include pseudo() {
				background: linear-gradient(to bottom, $green-main-color 0%, $green-main-color 50%, $green-shadow-color 50%, $green-shadow-color 100%);
			}
		}
		.ing2 {
			@include animation(run, 3s, ease, 1.3s, infinite);
			background: linear-gradient(to bottom, $brown-main-color 0%, $brown-main-color 50%, $brown-shadow-color 50%, $brown-shadow-color 100%);
			@include pseudo() {
				background: linear-gradient(to bottom, $brown-main-color 0%, $brown-main-color 50%, $brown-shadow-color 50%, $brown-shadow-color 100%);
			}
		}
		.ing3 {
			@include animation(run, 3s, ease, 1.2s, infinite);
			@include pseudo(){
				content: none;
			}
			width: ($size-basis * (90 / 100));
			height: ($size-basis * (5 / 100));
			background: $red-color;
		}
		.ing4 {
			@include animation(run, 3s, ease, 1.1s, infinite);
			background: linear-gradient(to bottom, $yellow-main-color 0%, $yellow-main-color 50%, $yellow-shadow-color 50%, $yellow-shadow-color 100%);
			@include pseudo() {
				background: linear-gradient(to bottom, $yellow-main-color 0%, $yellow-main-color 50%, $yellow-shadow-color 50%, $yellow-shadow-color 100%);
			}
		}
	}
	.bread-bottom {
		@include animation(run, 3s, ease, 1s, infinite);
		width: ($size-basis * (70 / 100));
		height: ($size-basis * (30 / 100));
		margin: ($size-basis * (2 / 100)) auto;
		background: linear-gradient(to bottom, $bread-main-color 0%, $bread-main-color 50%, $bread-shadow-color 50%, $bread-shadow-color 100%);
		@include pseudo() {
			@include bdrds();
			top: 0;
			height: ($size-basis * (30 / 100));
			width: ($size-basis * (30 / 100));
			background: linear-gradient(to bottom, $bread-main-color 0%, $bread-main-color 50%, $bread-shadow-color 50%, $bread-shadow-color 100%);
		}
		&:before {
			left: -($size-basis * (15 / 100));
		}
		&:after {
			right: -($size-basis * (15 / 100));
		}
		.wheel {
			@include bdrds();
			@include trsf(rotate(-45deg));
			border-style: solid;
			border-width: 0 0 ($size-basis * (2 / 100)) ($size-basis * (2 / 100));
			border-color: $black;
			width: ($size-basis * (25 / 100));
			height: ($size-basis * (25 / 100));
			background: $bread-main-color;
			
			position: absolute;
			top: ($size-basis * (20 / 100));
			z-index: 1;
			
			&:before {
				content: "";
				position: absolute;
				display: block;
				top: 50%;
				left: 50%;
				width: ($size-basis * (10 / 100));
				height: ($size-basis * (10 / 100));
				background: $black;
				@include trsf(translateX(-50%) translateY(-50%));
				@include bdrds();
			}
			@include separe-childs();
			&:last-child {
				&:before {
					width: ($size-basis * (15 / 100));
					height: ($size-basis * (15 / 100));
				}
			}
		}
	}
	
	.speed {
		position: absolute;
		left: -($size-basis * (18 / 100));
		top: 30%;
		background: inherit;
		height: ($size-basis * (10 / 100));
		width: ($size-basis * (15 / 100));
		
		@include pseudo();
		&:before {
			@include bdrds();
			height: ($size-basis * (10 / 100));
			width: ($size-basis * (10 / 100));
			left: -($size-basis * (5 / 100));
			background: inherit;
		}
		&:after {
			@include bdrds();
			top: 100%;
			right: ($size-basis * (5 / 100));
			height: ($size-basis * (10 / 100));
			width: ($size-basis * (10 / 100));
			background: $bg;
		}
	}
}

@include keyframe(run) {
	0% {
		@include trsf(translateX(0) translateY(0));
	}
	25% {
		@include trsf(translateX(10px) translateY(0));
	}
	40% {
		@include trsf(translateX(0px) translateY(0));
	}
	45% {
		@include trsf(translateX(-2px) translateY(-10px));
	}
	50% {
		@include trsf(translateX(-5px) translateY(0px));
	}
	65% {
		@include trsf(translateX(-10px) translateY(0px));
	}
	100% {
		@include trsf(translateX(0px) translateY(0px));
	}
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console