Dear friends in this articles we learn about how to make 3D flip book using CSS only with animation. If you like our article then visit more.
Creating a flip-book with HTML and CSS
This is a simple 3D flip book using CSS. This is geared towards beginners or anyone who may be frustrated with front-end development.
The HTML file is pretty straightforward just a header and our sections with the class names.
The CSS is also not to complicated pretty basic stuff going on with the body and h1 element. It gets really interesting in the Section element’s styling. We give it a background-repeat of no-repeat and yes you guessed it… it literally means what you think. We’re saying the background should not be repeated and make 3D flip book using CSS.
Press ctrl + 1 and see the shortcut feature of Visual Studio Code in front of you, using which makes our work easy and very quick, when you do ctrl + 1, then the complete syntax of html will open in front of you, using which we create a website We can create web applications, all the code that is written is written inside it, so it is very important for us to learn html if we want to become a web developer, then well then we know how 3d social media icon using css further coding do. This a best design in the css and you can make easily with source code that is given below. And hope you understand with our article because some changing on the source code you can copy all source code. It is a very amazing design because in this design make a 3D flip book using CSS with transform rotated.
Flip Book
In this section, I have divided it into four columns. You can add more team member information here if you want.
The hover effect has been used here, meaning that the color change can be seen by moving the mouse over the image
of each team member.In this article, I will try to show you in full step by step and with all the information how
I made it. Here I have shown step by step which programming code is used to create an element.
Nowadays, it seems like you can’t escape it. Web designers, UX professionals, and even that cousin of yours
(who is still perfecting his startup proposal) are all doing it… resizing your webpage! With the advent of responsive
design, this habit is hard to break for some. We’ve seen some creative approaches that are having some fun with this,
and we wanted to try out some new tricks too. We’ve created a fun Sass file that has a more light-hearted approach
Now finally to the piece of magic making this baby work. We set the background-attachment to “fixed”. Now all this is saying is that the background should effectively be rooted to the spot(fixed) regardless of whatever’s happening and this by and large is responsible for the flip-book actually working when we scroll and voila you have yourself a flip-book or scroll-book in this case. Show this off to your friends , family they’ll undoubtedly be in awe that you made this.
HTML for make Fan
Now open your vs code editor and go to the right top section and click on file and select new file then save filename.html after this press ctrl+1 then html syntax generate automatically on your editor. This feature inbuild only visual code editor so i suggested you download this editor and make projects easily because it is a best code editor software. And this design for stand fan project make a fast with visual studio code editor.
Now we will learn how to write html for stand 3D flip book using html, css. So let’s know that first you have to go to the body tag, after that you will take the div tag and together with the class whose name is to be named book. Then after that we will take div tag again and we will name its class as front cover. Again we will take div tag and name its class as back cover after that we will take div tag again and we will name its class as page 1. Again we will take div tag and name its class as page 2, then again take div tag and name its class as page 3. Now in the last we will take the div tag and name its class as center.
CSS for 3D flip book design
Now we will design the stand fan using css. So let’s design, first of all you have to know how we write css. We write css in 3 ways first we can write inline and second we can write it internal and third we can write it external so that we have to create new css file but in this article we have used internal css so that We will not have to create css file separately and we can work inside the same file.
First of all we have to go inside the head section and going inside we have to take style tag then we will take * tag and by applying curly braces open and close in it we will keep margin as 0 and padding as 0. And will keep its box sizing border box. Then we will take the body tag and flex the display in it, then we will center the justify content, after that we will center the align items and also make the background color rgb.
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: rgb(22, 22, 22);
}
Source Code..
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>3D Books</title> <style> @import url('https://fonts.googleapis.com/css2?family=Kanit&family=Poppins:wght@200&family=Righteous&family=Russo+One&family=Ubuntu+Mono&display=swap'); *{ margin: 0; padding: 0; box-sizing: border-box; font-family: 'poppins', sans-serif; } body{ background-color: rgb(58, 58, 58); } .container{ width: 250px; height: 350px; background-image: url(./front.jpeg); background-size: cover; position: relative; left: 50%; top: 320px; transform: translate(-50%, -50%); perspective: 1000px; } .cover{ width: 250px; height: 100%; position: absolute; left: 0px; background-image: url(./42-425276_s.jpg); background-size: cover; transform: rotateY(-20deg); transform-style: preserve-3d; transform-origin: left; transform: all .5s ease-in; transition: .5s ease-in; } .container:hover .cover{ transform: rotateY(-180deg); } figure{ margin: 0; display: block; position: absolute; width: 100%; height: 100%; backface-visibility: hidden; } figure.back{ transform: rotateY(180deg); background: rgba(12, 12, 12, 0.5); } h1{ text-align: center; font-size: 60px; font-weight: bold; margin-top: 30px; color: rgb(160, 6, 6); } h2{ text-align: center; } p{ text-align: center; font-weight: bold; margin-top: 100px; } </style> </head> <body> <div> <div> <figure> <h1>CSS</h1> <h2>3D BOOK</h2> <p>Design by Code with Nizami</p> </figure> <figure></figure> </div> </div> </body> </html>
Watch video related this article…