How to create paper corner fold effect on hover by using HTML and CSS? Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report The folding effect is quite attractive on the website, may you have seen on some websites when you hover on the paging layout it gets folded on the corner. The folding corner effect can be achieved by using HTML and CSS only. The below sections will guide you on how to create the animation. In this article, we will divide the article into two sections in the first section we will create the basic structure. In the second section, we will decorate the structure. Creating Structure: In this section, we will use only HTML to create the structure where we will use the corner folding effect. HTML Code: In this section we will create a basic div using the div tag giving it a class name. HTML <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <title> Paper corner fold effect on hover by using HTML and CSS </title> </head> <body> <center> <h1> GeeksforGeeks </h1> <b> Paper corner fold effect on hover by using HTML and CSS </b> <div class="Fold"> <h3> A Computer Science Portal for Geeks</h3> </div> </center> </body> </html> Design Structure: In this section, we will use only CSS to decorate the structure which is already created in the above section. CSS Code: In this section, we will first style the basic div element without the fold effect, then to create the fold effect we will use the CSS ::after pseudo-element. that will be positioned on the top right corner of the div box, the top and right border are set to colours that match the background color of parent div element.The left and bottom border are then given a darker shade of the div background color, we will also use the hover selector to create the folding effect when we hover the mouse over the box. CSS <style> h1 { color: green; } .Fold { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); width: 400px; height: 200px; background-color: #4EE73C; } h3 { margin: 20px; padding: 20px; } .Fold:after { position: absolute; content: ''; right: 0; top: 0; } .Fold:hover:after { transition-duration: 1s; border-bottom: 50px solid black; border-right: 50px solid white; } </style> Final Solution: It is the combination of the above two coding sections, y combining the above section we have created a folded corner effect on hover. HTML <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <title> Paper corner fold effect on hover by using HTML and CSS </title> <style> h1 { color: green; } .Fold { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); width: 400px; height: 200px; background-color: #4EE73C; } h3 { margin: 20px; padding: 20px; } .Fold:after { position: absolute; content: ''; right: 0; top: 0; } .Fold:hover:after { transition-duration: 1s; border-bottom: 50px solid black; border-right: 50px solid white; } </style> </head> <body> <center> <h1> GeeksforGeeks </h1> <b> Paper corner fold effect on hover by using HTML and CSS </b> <div class="Fold"> <h3> A Computer Science Portal for Geeks</h3> </div> </center> </body> </html> Output: Comment More infoAdvertise with us Next Article How to create paper corner fold effect on hover by using HTML and CSS? L lakshgoel204 Follow Improve Article Tags : Web Technologies Web Templates Similar Reads How to create Image Folding Effect using HTML and CSS? In this article, we are going to create an image folding effect below the main image. This is a simple project, we can achieve our target only by using HTML and CSS. Approach: Create the main div in which we are creating 4 list tags.Use of nth-child() selector property to give different styles to di 2 min read How to create Skewed Background with hover effect using HTML and CSS? The skewed background or you can say an angel color shade background can be created by using HTML and CSS. This background can be used as a cover pic of your website that will be attractive. In this article, we will create a simple skewed background. We will divide the article into two sections in t 2 min read How to Create Text Reveal Effect for Buttons using HTML and CSS ? Buttons are the most important user interface component for any website. It is very important to design the buttons in a creatively unique way. The text-reveal effect for a button is used when it is used to reveal some offer or exciting content for enhancing the user experience. Approach: The approa 2 min read How to Create Floating Box Effect using HTML and CSS ? The floating box effect is a classical example of a custom box-shadow technique. In this technique, we create realistic-looking shadows without using the box-shadow property that is provided by the CSS. Approach: The approach is to use after selector to use create shadow using the blur function. HTM 2 min read How to create followspot effect using HTML CSS and jQuery ? The follow-spot effect (spotlight effect) is an effect that can be easily implemented using jQuery. The effect is quite popular for the opening or front banner design for any website. Approach: The approach is to use circle CSS on the mouse movement effect using the mousemove() function provided by 2 min read Like