卡片翻转,故事展开:HTML+CSS动画让信息传递更生动!(含源码)

简介: 卡片翻转,故事展开:HTML+CSS动画让信息传递更生动!(含源码)

🌟如何让内容呈现更加吸引人成为设计师和开发者的挑战。大气实用的HTML5/CSS动画卡片提供了一种解决方案,它结合了视觉美感和动态效果,使得信息展示不仅大气而且具有高度的实用性。本文将探讨如何利用HTML5和CSS的动画特性,设计出既美观又功能丰富的动画卡片,提升用户体验。

   

完整代码

   

HTML

<section class="creative-cards style-one">
        <div class="container">
            <div class="row">
                <div class="card-column">
                    <div class="card-details">
                        <div class="card-icons">
                            <img class="light-icon" src="https://imgpanda.com/upload/ib/1yIWjyG41o.png" alt="icon" />
                        </div>
                        <h3><a href="https://www.fiverr.com/aliali44">Core Planning</a></h3>
                        <p>LNew content goes here. ollicitudi bibendum auctor.</p>
                        <a class="read-more-btn" href="https://www.fiverr.com/aliali44"><i
                                class="fa-solid fa-angles-right"></i></a>
                    </div>
                </div>
                <div class="card-column">
                    <div class="card-details">
                        <div class="card-icons">
                            <img class="light-icon" src="https://imgpanda.com/upload/ib/Q4tSh2ctkH.png" alt="icon" />
                        </div>
                        <h3><a href="https://www.fiverr.com/aliali44">Traditional Designs</a></h3>
                        <p>New content goes here.New content goes here. Aenean sollicitudi bibendum auctor.</p>
                        <a class="read-more-btn" href="https://www.fiverr.com/aliali44"><i
                                class="fa-solid fa-angles-right"></i></a>
                    </div>
                </div>
                <div class="card-column">
                    <div class="card-details">
                        <div class="card-icons">
                            <img class="light-icon" src="https://imgpanda.com/upload/ib/YQdOwN6IDJ.png" alt="icon" />
                        </div>
                        <h3><a href="https://www.fiverr.com/aliali44">Quality Materials</a></h3>
                        <p>New content goes here.New content goes here.liquet. Aenean sollicitudi bibendum auctor.</p>
                        <a class="read-more-btn" href="https://www.fiverr.com/aliali44"><i
                                class="fa-solid fa-angles-right"></i></a>
                    </div>
                </div>
            </div>
        </div>
    </section>

CSS代码:

body {
            font-size: 17px;
            line-height: 30px;
            font-weight: 400;
            -moz-osx-font-smoothing: grayscale;
            word-break: break-word;
            -webkit-font-smoothing: antialiased;
            font-family: "Epilogue", sans-serif;
            margin: 0;
            background: #fff;
        }
        * {
            box-sizing: border-box;
        }
        .creative-cards {
            padding: 120px 0;
            position: relative;
        }
        .creative-cards .container {
            max-width: 1320px;
            width: 100%;
            padding-right: .75rem;
            padding-left: .75rem;
            margin-right: auto;
            margin-left: auto;
        }
        .creative-cards .container .row {
            display: flex;
            flex-wrap: wrap;
        }
        .creative-cards .container .row .card-column {
            flex: 0 0 auto;
            width: 33.33333333%;
            text-align: center;
            max-width: 100%;
            padding-right: 15px;
            padding-left: 15px;
        }
        .card-details {
            width: 80%;
            margin: auto;
            position: relative;
            transition: .3s ease-in-out;
        }
        .card-details:before {
            content: "";
            width: 190px;
            height: 380px;
            background: #f7f6f2;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%) skew(-20deg, 0deg);
            z-index: -1;
            transition: .3s ease-in-out;
        }
        .card-details:hover:before {
            background-color: #fffab3;
        }
        .card-icons {
            width: 140px;
            height: 150px;
            position: relative;
            margin: auto;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .card-icons:before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            border: 1px solid;
            width: 100%;
            height: 100%;
            transform: skew(-20deg, 0deg);
            background: #fff;
            border-color: #ffee02;
            transition: .3s ease-in-out;
        }
        .card-details:hover .card-icons:before {
            background-color: #ffee02;
        }
        .card-icons img {
            position: relative;
            width: 70px;
            height: 70px;
        }
        .card-details h3 {
            margin-bottom: 15px;
            margin-top: 50px;
            font-weight: 700;
            font-size: 1.75rem;
            line-height: 1.2;
        }
        .card-details h3 a {
            color: #000;
            text-decoration: none;
        }
        .card-details p {
            font-size: 16px;
            line-height: 30px;
            color: #444;
            font-weight: 400;
            margin-bottom: 30px;
        }
        .read-more-btn {
            width: 50px;
            height: 50px;
            display: flex;
            justify-content: center;
            align-items: center;
            border: 1px solid;
            border-radius: 100%;
            margin: auto;
            background: #fff;
            transform: translateX(-10px);
            opacity: 0;
            visibility: hidden;
            border-color: #ffee02;
            transition: .3s ease-in-out;
            text-decoration: none;
        }
        .read-more-btn i {
            color: #000;
            font-size: 12px;
        }
        .card-details:hover .read-more-btn {
            transform: translateX(0);
            opacity: 1;
            visibility: visible;
        }
        /* ============= Responsive Ipad ==================== */
        @media (max-width: 992px) {
            .creative-cards .container .row .card-column {
                flex: 0 0 auto;
                width: 50%;
                margin-bottom: 40px;
            }
        }
        /* ============= Responsive Iphone ==================== */
        @media (max-width: 480px) {
            .creative-cards .container .row .card-column {
                flex: 0 0 auto;
                width: 100%;
                margin-bottom: 20px;
            }
            .card-details {
                width: 100%;
            }
            .read-more-btn {
                transform: translateX(0px);
                opacity: 1;
                visibility: visible;
            }
        }
相关文章
|
6天前
|
移动开发 HTML5
响应式精品资源导航源码html5
一款响应式精品网站推荐导航源码,可以自己修改代码替换图标图片和指向网址。背景图支持自动替换,背景图可以在images中修改,本地双击html即可查看效果
13 1
响应式精品资源导航源码html5
|
8天前
|
Web App开发 前端开发 JavaScript
HTML/CSS/JS学习笔记 Day3(HTML--网页标签 下)
HTML/CSS/JS学习笔记 Day3(HTML--网页标签 下)
|
7天前
|
搜索推荐
2024微信个人名片在线生成HTML源码
微信个人名片卡片在线生成,这是一款微信个人名片生成网站源码,无第三方接口,本地直接生成可长期使用。 主要用于生成用户个性化的名片页面,包括头像、姓名、联系方式、个人介绍等信息。 在本地浏览器打开即可,源码是html的,也可上传到服务器上。
9 0
2024微信个人名片在线生成HTML源码
|
15天前
|
移动开发 HTML5
蓝色炫酷碎粒子HTML5导航源码
蓝色炫酷碎粒子HTML5导航源码,源码由HTML+CSS+JS组成,记事本打开源码文件可以进行内容文字之类的修改,双击html文件可以本地运行效果,也可以上传到服务器里面,重定向这个界面
27 1
|
16天前
一款好看的导航网HTML源码(全静态页面带特效)
一款好看的导航网源码(全静态页面带特效),页面自适应,单页源码没有后台,需要的下载。
26 1
|
16天前
个人博客新引导主页html源码
个人博客新引导主页html源码,随机背景,字体颜色变换,记事本打开自己动手修改一下就可以啦。
13 1
|
27天前
|
前端开发 程序员
HTML+CSS+JavaScript制作动态七夕表白网页(含音乐+自定义文字)
一年一度的520情人节/七夕情人节/女朋友生日/程序员表白,是不是要给女朋友或者正在追求的妹子一点小惊喜呢,今天这篇博客就分享下前端代码如何实现HTML+CSS+JavaScript制作七夕表白网页(含音乐+自定义文字)。赶紧学会了,来制作属于我们程序员的浪漫吧!
41 0
HTML+CSS+JavaScript制作动态七夕表白网页(含音乐+自定义文字)
|
1月前
|
JSON 前端开发 JavaScript
使用html,css,js 实现一个龙年春节祝福卡片效果
使用html,css,js 实现一个龙年春节祝福卡片效果
38 4
|
18天前
|
前端开发 JavaScript 搜索推荐
打造个人博客网站:从零开始的HTML、CSS与JavaScript之旅
在这个数字时代,拥有一个个性化的网络空间已成为许多人的梦想。本文将引导你了解如何从零开始,使用HTML、CSS和JavaScript创建属于自己的博客网站。我们将探索这些技术的基础概念,并通过实际代码示例展示如何将静态页面转变为动态交互式网站。无论你是编程新手还是希望扩展技能的开发者,这篇文章都将为你提供一条清晰的学习路径。【8月更文挑战第31天】
|
1月前
|
监控 数据可视化 前端开发
【前端】政务服务大数据可视化监控平台(源码+html+css+js)
【前端】政务服务大数据可视化监控平台(源码+html+css+js)