Chauve souris

In this example below you will see how to do a Chauve souris with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by dekoh, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright dekoh ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Chauve souris </title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div id="movechauf"><div id="taille"><div id="chaufsouris">Chaufsouris</div></div></div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/dekoh/chauve-souris-rxAbB */
#chaufsouris{
	background: url(http://dekoh.eu/ladansedelavie/images/chauvesouris.png) no-repeat;
	width: 120px;
	height: 201px;
	text-indent: -9999px;
	-webkit-animation:chaufsourisvole .2s infinite;
}
#movechauf{
	top: 200px;
	position: absolute;
	-webkit-animation:chaufsourismove 15s linear infinite;
}
#taille{
	-webkit-transform: scale(0.5,0.5);
}
	
@-webkit-keyframes chaufsourisvole{
	0%, 9.99%{
		background-position: 0px;
	}
	10%, 19.99%{
		background-position: -120px;
	}
	20%, 29.99%{
		background-position: -240px;
	}
	30%, 39.99%{
		background-position: -360px;
	}
	40%, 49.99%{
		background-position: -480px;
	}
	50%, 59.99%{ 
		background-position: -600px;
	}
	60%, 69.99%{ 
		background-position: -480px;
	}
	70%, 79.99%{ 
		background-position: -360px;
	}
	80%, 89.99%{ 
		background-position: -240px;
	}
	90%, 99.99%{ 
		background-position: -120px;
	}
		
}
@-webkit-keyframes chaufsourismove{
	from{
		left: -20%;
		-webkit-transform: rotateY(180deg);
	}
	5%{
		left:-20%;
	}
	25%{
		left: 110%;
		-webkit-transform: rotateY(180deg);
	}
	25.1%{
		-webkit-transform: rotateY(0deg);
	}
	30%{
		left: 110%;
	}
	65%{
		left: -20%;
	}
	to{
		left: -20%;
		
	}
}

Comments