{"id":140,"date":"2024-05-16T16:34:50","date_gmt":"2024-05-16T16:34:50","guid":{"rendered":"https:\/\/codebox.keyframetechsolution.com\/?p=140"},"modified":"2025-02-08T15:37:21","modified_gmt":"2025-02-08T15:37:21","slug":"3d-card-hover-effect-using-html-css-only","status":"publish","type":"post","link":"https:\/\/codebox.keyframetechsolution.com\/3d-card-hover-effect-using-html-css-only\/","title":{"rendered":"How to Create 3D Animated Card Hover Effect using HTML CSS Only"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p><span data-preserver-spaces=\"true\">Adding interactive effects to websites is a great way to grab visitors&#8217; attention. One effect that has become widespread is the 3D card hover effect. <\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Using CSS you can create dynamic cards that respond with smooth animations when hovered over, making them a great choice for showcasing content in a fun, engaging way. <\/span><\/p>\n<p><span data-preserver-spaces=\"true\">In this guide, I&#8217;ll show you how to create a stunning 3D animated card hover effect using only HTML and CSS.<\/span><\/p>\n<h3><span data-preserver-spaces=\"true\">What You\u2019ll Learn:<\/span><\/h3>\n<ul>\n<li><span data-preserver-spaces=\"true\">Setup for basic structure of HTML and CSS.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">How to apply <a href=\"https:\/\/www.w3schools.com\/CSS\/css3_3dtransforms.asp\" rel=\"nofollow noopener\" target=\"_blank\">3D transformations<\/a>.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Adding animation to create smooth hover effects.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Customizing card design with additional styles.<\/span><\/li>\n<\/ul>\n<p>\u2705\u00a0<strong>Watch Live Preview<\/strong>\u00a0\ud83d\udc49\ud83d\udc49<\/p>\n<p><iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/Ft9t5WKFVT8?si=S23beZFBbAG0rgas\" width=\"100%\" height=\"450\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p><a href=\"#conclusion\">Click Here to Download the Code<\/a><\/p>\n<h3><span data-preserver-spaces=\"true\">Why use 3D Hover Effect?<\/span><\/h3>\n<p><span data-preserver-spaces=\"true\">First, it makes the website interactive and visually appealing. Instead of static elements, it adds depth and interactivity, making the user experience more enjoyable. <\/span><\/p>\n<p><span data-preserver-spaces=\"true\">This effect can be used for product cards, portfolio pieces, image galleries, and more.<\/span><\/p>\n<p><span data-preserver-spaces=\"true\">Additionally, creating this effect allows you to achieve smooth animations without relying on JavaScript or external libraries, making the design both lightweight and efficient. <\/span><\/p>\n<p><span data-preserver-spaces=\"true\">This approach ensures faster load times and a more streamlined user experience while still delivering impressive interactive visuals. Now, let&#8217;s create!<\/span><\/p>\n<p><strong>Also read:<\/strong> <a href=\"https:\/\/codebox.keyframetechsolution.com\/inverted-border-radius-card-css\/\">Create Responsive Inverted Border Radius Card using HTML CSS Only<\/a><\/p>\n<h3><span data-preserver-spaces=\"true\">Set Up Your Project<\/span><\/h3>\n<p><span data-preserver-spaces=\"true\">To get started, create a folder and include the following files:<\/span><\/p>\n<ul>\n<li><strong>index.html\u00a0<\/strong><\/li>\n<li><strong>style.css\u00a0<\/strong><\/li>\n<li><strong>script.js\u00a0\u00a0<\/strong><\/li>\n<\/ul>\n<h3><span data-preserver-spaces=\"true\">Setting Up HTML Structure<\/span><\/h3>\n<div class=\"code-container\">\n<div class=\"toolbar\">\n<div class=\"actions\">\n        <span><\/span><br \/>\n        <span class=\"yellow\"><\/span><br \/>\n        <span class=\"green\"><\/span>\n      <\/div>\n<div class=\"title\">index.html<\/div>\n<\/p><\/div>\n<div class=\"code-content\">\n<pre><code class=\"language-markup\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n  &lt;meta charset=\"UTF-8\"&gt;\r\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\r\n  &lt;title&gt;How to Create 3D Animated Card Hover Effect using HTML CSS Only&lt;\/title&gt;\r\n  &lt;link rel=\"stylesheet\" href=\"style.css\"&gt;\r\n  &lt;link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/4.7.0\/css\/font-awesome.min.css\"&gt;\r\n  &lt;script src=\"https:\/\/code.jquery.com\/jquery-3.5.1.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/typed.js\/2.0.11\/typed.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/waypoints\/4.0.1\/jquery.waypoints.min.js\"&gt;&lt;\/script&gt;\r\n  &lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.0-alpha1\/dist\/css\/bootstrap.min.css\"&gt;&lt;\/script&gt;\r\n  &lt;link rel=\"stylesheet\" href=\"https:\/\/fonts.googleapis.com\/css2?family=Poppins:wght@400;500;600;700&amp;family=Ubuntu:wght@400;500;700&amp;display=swap\"&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;!-- CODE --&gt;\r\n\r\n&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.0-alpha1\/dist\/js\/bootstrap.bundle.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"script.js\"&gt;&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<h3><span data-preserver-spaces=\"true\">Styling the Card with CSS<\/span><\/h3>\n<div class=\"code-container\">\n<div class=\"toolbar\">\n<div class=\"actions\">\n        <span><\/span><br \/>\n        <span class=\"yellow\"><\/span><br \/>\n        <span class=\"green\"><\/span>\n      <\/div>\n<div class=\"title\">style.css<\/div>\n<\/p><\/div>\n<div class=\"code-content\">\n<pre><code class=\"language-markup\">\r\n&lt; \/* Your CSS code here *\/ &gt;\r\n&lt; * { &gt;\r\n\r\n&lt; margin: 0; &gt;\r\n&lt; padding: 0 &gt;\r\n&lt; box-sizing: border-box; &gt;\r\n&lt;     text-decoration: none; &gt;\r\n&lt;     } &gt;\r\n      <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<h2><span data-preserver-spaces=\"true\">Adding Depth with Box Shadows<\/span><\/h2>\n<p><span data-preserver-spaces=\"true\">To take the 3D effect to the next level, I&#8217;ve added a <a href=\"https:\/\/css-tricks.com\/almanac\/properties\/b\/box-shadow\/\" rel=\"nofollow noopener\" target=\"_blank\">box-shadow<\/a> to simulate depth. This gives the card the illusion of floating above the background, enhancing its interactive feel and making it appear more realistic.<\/span><\/p>\n<h2><span data-preserver-spaces=\"true\">Adding a Smooth Animation<\/span><\/h2>\n<p><span data-preserver-spaces=\"true\">We can further enhance the effect by adding smooth animations to card. This will give card a more polished feel when transitioning between states.<\/span><\/p>\n<h2><span data-preserver-spaces=\"true\">Final Touches<\/span><\/h2>\n<p><span data-preserver-spaces=\"true\">To enhance the card&#8217;s design, we can adjust the colors, fonts, and add a hover effect to the text. <\/p>\n<p>These changes not only make the card more visually attractive but also introduce a layer of interactivity, creating a more engaging experience for users when they hover over the card.<\/span><\/p>\n<p><strong>Also read: <\/strong><a href=\"https:\/\/codebox.keyframetechsolution.com\/responsive-multiple-card-slider\/\">How to Build Responsive Multiple Card Slider \u2013 HTML CSS JavaScript<\/a><\/p>\n<h2 id=\"conclusion\"><span data-preserver-spaces=\"true\">Conclusion<\/span><\/h2>\n<p>Congratulations! You&#8217;ve successfully created a 3D animated card hover effect by following this step-by-step guide. <\/p>\n<p>Here&#8217;s a quick recap of the steps we covered:<\/p>\n<ol>\n<li><span data-preserver-spaces=\"true\">Set up the basic HTML structure.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Styled the card with basic CSS properties.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Added the 3D hover effect using the transform property.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Enhanced the effect with depth and shadow.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Last but not least, added hover text effect to make the card stand out.<\/span><\/li>\n<\/ol>\n<p><span data-preserver-spaces=\"true\">You can now use this on your website for product displays, portfolios, or any other content where you want to create an interactive design. <\/p>\n<p>Experiment with the values, colors, and animations to make the effect fit your specific design needs.<\/span><\/p>\n<h3><span data-preserver-spaces=\"true\">Customizing Further<\/span><\/h3>\n<p><span data-preserver-spaces=\"true\">If you&#8217;d like to make the card more unique, here are a few ideas:<\/span><\/p>\n<ul>\n<li><span data-preserver-spaces=\"true\">Add images inside the card for a more engaging design.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Use different animations like <\/span><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/transform-function\/rotateZ\" rel=\"nofollow noopener\" target=\"_blank\"><span data-preserver-spaces=\"true\">rotateZ<\/span><\/a><span data-preserver-spaces=\"true\">() or <a href=\"https:\/\/tympanus.net\/codrops\/css_reference\/translate3d\/\" rel=\"nofollow noopener\" target=\"_blank\">translate3d()<\/a> to create more dynamic movements.<\/span><\/li>\n<li><span data-preserver-spaces=\"true\">Incorporate a background image or gradient for extra style.<\/span><\/li>\n<\/ul>\n<p><span data-preserver-spaces=\"true\">Keep experimenting, and happy coding!<\/span><\/p>\n<p><strong><i class=\"fa fa-download\" style=\"color: #046bd2;\"><\/i> 98 people bought this<\/strong><\/p>\n<p><strong>Grab it Now for Just <i class=\"fa fa-rupee\" style=\"color:#046bd2;\"><\/i><span style=\"color:#046bd2;\">20<\/span><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Adding interactive effects to websites is a great way to grab visitors&#8217; attention. One effect that has become widespread [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":142,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[392,393,394,390,113,391],"class_list":["post-140","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hover-effects","tag-3d-card-animation-css","tag-3d-card-effect-css","tag-3d-card-hover-effect-css","tag-3d-card-hover-effect-html-css","tag-card-hover-effects-css","tag-simple-card-hover-effects"],"acf":[],"_links":{"self":[{"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/posts\/140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/comments?post=140"}],"version-history":[{"count":12,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/posts\/140\/revisions"}],"predecessor-version":[{"id":1450,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/posts\/140\/revisions\/1450"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/media\/142"}],"wp:attachment":[{"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/media?parent=140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/categories?post=140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codebox.keyframetechsolution.com\/wp-json\/wp\/v2\/tags?post=140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}