FlipcardTutorials

How to create a animation flipcard

How to create a animation flipcard

How to create a animation flipcard

Before We Start

Every developer needs clean and modern elements to develop their websites, It contains pictures and a user interface element within a website. The most important one and the first section that the user sees when the user enters a website. How to create a animation flipcard

So if you are a person who wishes to develop a website, you have to know how to create that properly.

How to create a animation flipcard

We are here to solve your problem. In this article we discuss how to create these elements. Before we start please read the below articles which easier you to understand the process, if you are new to development.

Step 1 – Add HTML

It’s too easy and simple. Just copy and paste below code in your HTML editor between <body> </body> tag.


<div class="frame">
		<div class="flipcard">
			<div class="flip">
			<div class="sideone">
			<img class="bike" src="https://100dayscss.com/codepen/bycicle.svg">
				<div class="road">
					<div class="stripe stripe-one"></div>
					<div class="stripe stripe-two"></div>
					<div class="stripe stripe-three"></div>
					<div class="stripe stripe-four"></div>
					<div class="stripe stripe-five"></div>
					<div class="stripe stripe-six"></div>
					<div class="stripe stripe-seven"></div>
					<div class="stripe stripe-eight"></div>
					</div><!--End of road-->
				</div> <!--End of sideone-->
			<div class="sidetwo">
				<img class="helicopter" src="https://100dayscss.com/codepen/helicopter.svg">
				<div class="sky">
					<div class="cloud cloud-one"></div>
					<div class="cloud cloud-two"></div>
					<div class="cloud cloud-three"></div>
					<div class="cloud cloud-four"></div>
					<div class="cloud cloud-five"></div>
					<div class="cloud cloud-six"></div>
					<div class="cloud cloud-seven"></div>
					<div class="cloud cloud-eight"></div>
					</div><!--End of sky-->
			</div>
				</div>
			</div><!--End of flipcard-->
  </div>
</div>

Step 2 – Add CSS

Copy and paste below code in your HTML editor between <style></style> tag.

<style>
// delete the following line if no text is used
// edit the line if you wanna use other fonts
@import url(https://fonts.googleapis.com/css?family=Open+Sans:700,300);

// use only the available space inside the 400x400 frame
.frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  margin-top: -200px;
  margin-left: -200px;
  border-radius: 2px;
	box-shadow: 4px 8px 16px 0 rgba(0,0,0,0.1);
	overflow: hidden;
  background: #604D49;
  color: #333;
	font-family: 'Open Sans', Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.flipcard{
	  position: absolute;
    width: 320px;
    height: 180px;
    top: 110px;
    left: 40px;
    -webkit-perspective: 800px;
    perspective: 800px;
}

.flipcard:hover .flip{
	transform:rotateX(180deg);
}

.flip{
		width: 100%;
    height: 100%;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    transition: all 1s ease-in-out;
    -webkit-perspective: 1000px;
    perspective: 1000px;
}

.sideone{
	z-index: 2;
	-webkit-transform: rotateX(0);
	transform: rotateX(0);
}

.sideone, .sidetwo{
		position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFCE4E;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 3px;
    overflow: hidden;
    text-align: center;
}

.bike{
    position: relative;
    top: 52px;
    -webkit-animation: bouncy .6s ease-in-out 	infinite;
    animation: bouncy .6s ease-in-out infinite;
    -webkit-transform-origin: 50% 100%;
    transform-origin: 50% 100%;
}

.road{
	position: absolute;
	top: 127px;
	left: 80px;
	width: 160px;
	height: 3px;
	overflow: hidden;
}

.stripe{
	position:absolute;
	background-color:#333;
	height:3px;
}

.stripe-one{
	width:30px;
	left:10px;
	animation:road 3s linear infinite;
}

.stripe-two{
	width:30px;
	left:20px;
	bottom:0;
	animation:road 3s linear 0.2s infinite;
}

.stripe-two{
	width:30px;
	left:40px;
	bottom:0;
	animation:road 3s linear 0.3s infinite;
}

.stripe-three{
	width:50px;
	left:90px;
	bottom:0;
	animation:road 3s linear 0.4s infinite;
}

.stripe-four{
	width:20px;
	left:160px;
	bottom:0;
	animation:road 3s linear 0.5s infinite;
}

.stripe-five{
	width:20px;
	left:200px;
	bottom:0;
	animation:road 3s linear 0.6s infinite;
}

.stripe-six{
	width:30px;
	left:250px;
	bottom:0;
	animation:road 3s linear 0.7s infinite;
}

.stripe-seven{
	width:20px;
	left: 300px;
	bottom:0;
	animation:road 3s linear 0.8s infinite;
}

.sidetwo{
	 transform: rotateX(180deg);
}

.helicopter{
	position: relative;
  z-index: 1;
  top: 57px;
	animation:bouncy 1s infinite;
}

.sky{
	position: absolute;
	top: 30px;
	left: 80px;
	width: 160px;
	height:100px;
	overflow: hidden;
}

.cloud{
	position:absolute;
	background-color:#333;
	height:3px;
	width:20px;
}

.cloud-one{
	top:10px;
	left:40px;
	animation: road 2s linear infinite;
}

.cloud-two{
	top:30px;
	animation: road 2s linear 0.2s infinite;
}

.cloud-three{
	top:50px;
	left:40px;
	animation: road 2s linear 0.3s infinite;
}

.cloud-four{
	top:80px;
	left:40px;
	animation: road 2s linear 0.4s infinite;
}

.cloud-five{
	left:100px;
	animation: road 2s linear 0.5s infinite;
}

.cloud-six{
	left:130px;
	top:35px;
	animation: road 2s linear 0.6s infinite;
}

.cloud-seven{
	left:150px;
	top:50px;
	animation: road 2s linear 0.7s infinite;
}

.cloud-eight{
	bottom:0;
	left:50px;
	animation: road 2s linear 0.8s infinite;
}


@keyframes road {
	0% {
		transform: translate3d(210px, 0, 0);
	}
	100% {
		transform: translate3d(-210px,0,0);
	}
}

@keyframes bouncy {
	0%{
		transform:translateY(1px);
	}
	50%{
		transform:translateY(-1px);
	}
	100%{
		transform:translateY(1px);
	}
}


@keyframes road {
	0% {
		transform: translate3d(210px, 0, 0);
	}
	100% {
		transform: translate3d(-210px,0,0);
	}
}
</style>

At the end we will have something like this. You can change fonts, colors, backgrounds and all things that you want. Enjoy it.

Your Output

How to create a animation flipcard

Video Tutorial

Please watch this video to better understand this tutorial and don’t forget to subscribe to our channel.


Help others to find out about this article on Social Media sites. If you have any doubt or any problem, don’t hesitate to contact us. Thereafter we will be able to help you and also make sure you bookmark our site on your browser.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button