cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

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="container">
	
	<h1>SVG Animated Birds</h1>
	
	<div class="bird-container bird-container--one">
		<div class="bird bird--one"></div>
	</div>
	
	<div class="bird-container bird-container--two">
		<div class="bird bird--two"></div>
	</div>
	
	<div class="bird-container bird-container--three">
		<div class="bird bird--three"></div>
	</div>
	
	<div class="bird-container bird-container--four">
		<div class="bird bird--four"></div>
	</div>
	
</div>

            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Arima+Madurai:300');

*,
*::before,
*::after {
	box-sizing: border-box;
}

h1 {
	font-family: 'Arima Madurai', cursive;
	color: black;
	font-size: 4rem;
	letter-spacing: -3px;
	text-shadow: 0px 1px 1px rgba(255,255,255,0.6);
	position: relative;
	z-index: 3;
}

.container {
	z-index: 1;
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	// min-height: 100vh;
	min-height: 35rem;
	background-image: linear-gradient(to bottom,  rgba(255,168,76,0.6) 0%,rgba(255,123,13,0.6) 100%), url('https://images.unsplash.com/photo-1446824505046-e43605ffb17f');
	background-blend-mode: soft-light;
	background-size: cover;
	background-position: center center;
	padding: 2rem;
}

.bird {
	background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/174479/bird-cells.svg);
	background-size: auto 100%;
	width: 88px;
	height: 125px;
	will-change: background-position;
	
	animation-name: fly-cycle;
	animation-timing-function: steps(10);
	animation-iteration-count: infinite;

	&--one {
		animation-duration: 1s;
		animation-delay: -0.5s;		
	}
	
	&--two {
		animation-duration: 0.9s;
		animation-delay: -0.75s;
	}
	
	&--three {
		animation-duration: 1.25s;
		animation-delay: -0.25s;
	}
	
	&--four {
		animation-duration: 1.1s;
		animation-delay: -0.5s;
	}

}

.bird-container {
	position: absolute;
	top: 20%;
	left: -7.5vw;
	transform: scale(0);
	will-change: transform;
	
	animation-name: fly-right-one;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	
	&--one {
		animation-duration: 15s;
		animation-delay: 0;
	}
	
	&--two {
		animation-duration: 16s;
		animation-delay: 1s;
	}
	
	&--three {
		animation-duration: 14.6s;
		animation-delay: 9.5s;
	}
	
	&--four {
		animation-duration: 16s;
		animation-delay: 10.25s;
	}
	
}

@keyframes fly-cycle {
	
	100% {
		background-position: -900px 0;
	}
	
}

@keyframes fly-right-one {
	
	0% {
		left: -10%;
		transform: scale(0.3);
	}
	
	10% {
		left: 10%;
		transform: translateY(2vh) scale(0.4);
	}
	
	20% {
		left: 30%;
		transform: translateY(0vh) scale(0.5);
	}
	
	30% {
		left: 50%;
		transform: translateY(4vh) scale(0.6);
	}
	
	40% {
		left: 70%;
		transform: translateY(2vh) scale(0.6);
	}
	
	50% {
		left: 90%;
		transform: translateY(0vh) scale(0.6);
	}
	
	60% {
		left: 110%;
		transform: translateY(0vh) scale(0.6);
	}
	
	100% {
		left: 110%;
		opacity: 1;
		transform: translateY(0vh) scale(0.6);
	}
	
}

@keyframes fly-right-two {
	
	0% {
		left: -10%;
		opacity: 1;
		transform: translateY(-2vh) scale(0.5);
	}
	
	10% {
		left: 10%;
		transform: translateY(0vh) scale(0.4);
	}
	
	20% {
		left: 30%;
		transform: translateY(-4vh) scale(0.6);
	}
	
	30% {
		left: 50%;
		transform: translateY(1vh) scale(0.45);
	}
	
	40% {
		left: 70%;
		transform: translateY(-2.5vh) scale(0.5);
	}
	
	50% {
		left: 90%;
		transform: translateY(0vh) scale(0.45);
	}
	
	51% {
		left: 110%;
		transform: translateY(0vh) scale(0.45);
	}
	
	100% {
		left: 110%;
		transform: translateY(0vh) scale(0.45);
	}
	
}
            
          
!
999px
Loading ..................

Console