Business Card Design – Solution: Business Card Design using HTML & CSS with source code, demo, and also how you can execute full program easily. To complete the program you need to follow those steps given bellow
Live Demo
Also Helpful –
Business Card Design using HTML & CSS
Hi
Back to coding, To complete this program with debugging free code you have to create three files. The first file is to HTML and the second file gonna be CSS for design part and the third file JavaScript for function-related,
index.html
Create an HTML file named ‘index.html‘ and put those codes given below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
<!-- Coding Debugging (https://codingdebugging.com) --> <!DOCTYPE html> <html> <head> <title>Business Card Design - Coding Debugging</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Font Awesome CSS --> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"> <!-- jQuery JS --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script> <!-- Google Fonts --> <link href="https://fonts.googleapis.com/css2?family=Baloo+Thambi+2:wght@400;500;600;700;800&display=swap" rel="stylesheet"> <!-- My Stylesheet --> <link rel="stylesheet" href="style.css"> </head> <body> <div class="business-card middle"> <div class="front"> <h2>Rajib Biswas</h2> <span>Web Develpoer</span> <ul class="contact-info"> <li> <i class="fas fa-mobile-alt"></i> +91 77*777**7* </li> <li> <i class="far fa-envelope"></i> *rajib***7@gmail.com </li> <li> <i class="fas fa-map-marker-alt"></i> West Bengal, India </li> </ul> </div> <div class="back"> <span>Click Me!!!</span> </div> </div> <!-- JavaScript Page --> <script src="function.js" type="text/javascript"></script> </body> </html> |
style.css
Create a CSS file named ‘style.css‘ and put those codes given below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
*{ margin: 0; padding: 0; font-family: "Baloo Thambi 2", cursive; box-sizing: border-box; list-style: none; } body{ background-color: #BD2B2B; background-size: cover; } .business-card{ width: 500px; height: 280px; } .middle{ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); } .front,.back{ width: 100%; height: 100%; overflow: hidden; position: absolute; backface-visibility: hidden; transition: transform 0.5s linear; cursor: pointer; } .front{ background: rgba(255,255,255,.7); padding: 40px; transform: perspective(600px) rotateX(180deg); } .front::before,.front::after{ content: ""; position: absolute; right: 0; } .front::before{ background: #2c3e50; width: 80px; height: 120px; bottom: 0; clip-path:polygon(0 100%,40% 0,100% 100%); } .front::after{ background: #34495e; width: 100px; height: 100%; top: 0; clip-path:polygon(0 0,100% 0,100% 100%,80% 100%); } .front h2{ text-transform: uppercase; } .front span{ background: #34495e; color: #fff; padding: 4px 10px; display: inline-block; margin-bottom: 20px; font-size: 14px; } .front .contact-info li{ margin: 10px 0; display: flex; align-items: center; } .front .contact-info li i{ width: 26px; height: 26px; background: #34495e; color: #fff; display: flex; justify-content: center; align-items: center; margin-right: 6px; } .back{ background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; color: #fff; text-transform: uppercase; letter-spacing: 8px; font-size: 24px; transform: perspective(600px) rotateX(0deg); } .business-card-active .front{ transform: perspective(600px) rotateX(0deg); } .business-card-active .back{ transform: perspective(600px) rotateX(-180deg); } |
function.js
Create a JavaScript file named ‘function.js‘ and put those codes given below.
1 2 3 4 |
//Click Me!!! Function $(".business-card").click(function(){ $(".business-card").toggleClass("business-card-active"); }); |
Thank you for visiting!
We appreciate you for your precious time. I hope you are learn something from here! If you have any queries about this coding comment down below we will reply ASAP.
Keep coding, Keep debugging!