页面页脚部分CSS分享

先看效果:

CSS部分:(查看更多

html 复制代码
<style>
    body {
        display: grid;
        grid-template-rows: 1fr 10rem auto;
        grid-template-areas: "main" "." "footer";
        overflow-x: hidden;
        background: #F5F7FA;
        min-height: 100vh;
        font-family: "Open Sans", sans-serif;
    }
    body .footer {
        z-index: 1;
        --footer-background:#ED5565;
        display: grid;
        position: relative;
        grid-area: footer;
        min-height: 12rem;
    }
    body .footer .bubbles {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1rem;
        background: var(--footer-background);
        filter: url("#blob");
    }
    body .footer .bubbles .bubble {
        position: absolute;
        left: var(--position, 50%);
        background: var(--footer-background);
        border-radius: 100%;
        -webkit-animation: bubble-size var(--time, 4s) ease-in infinite var(--delay, 0s), bubble-move var(--time, 4s) ease-in infinite var(--delay, 0s);
        animation: bubble-size var(--time, 4s) ease-in infinite var(--delay, 0s), bubble-move var(--time, 4s) ease-in infinite var(--delay, 0s);
        transform: translate(-50%, 100%);
    }
    body .footer .content {
        z-index: 2;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-gap: 4rem;
        padding: 2rem;
        background: var(--footer-background);
    }
    body .footer .content a, body .footer .content p {
        color: #F5F7FA;
        text-decoration: none;
    }
    body .footer .content b {
        color: white;
    }
    body .footer .content p {
        margin: 0;
        font-size: 0.75rem;
    }
    body .footer .content > div {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    body .footer .content > div > div {
        margin: 0.25rem 0;
    }
    body .footer .content > div > div > * {
        margin-right: 0.5rem;
    }
    body .footer .content > div .image {
        align-self: center;
        width: 4rem;
        height: 4rem;
        margin: 0.25rem 0;
        background-size: cover;
        background-position: center;
    }

    @-webkit-keyframes bubble-size {
        0%, 75% {
            width: var(--size, 4rem);
            height: var(--size, 4rem);
        }
        100% {
            width: 0rem;
            height: 0rem;
        }
    }

    @keyframes bubble-size {
        0%, 75% {
            width: var(--size, 4rem);
            height: var(--size, 4rem);
        }
        100% {
            width: 0rem;
            height: 0rem;
        }
    }
    @-webkit-keyframes bubble-move {
        0% {
            bottom: -4rem;
        }
        100% {
            bottom: var(--distance, 10rem);
        }
    }
    @keyframes bubble-move {
        0% {
            bottom: -4rem;
        }
        100% {
            bottom: var(--distance, 10rem);
        }
    }
</style>
相关推荐
漂流瓶jz3 小时前
Webpack如何实现万物皆可import?loader的使用/配置/手写实践
前端·javascript·webpack
ZC跨境爬虫3 小时前
跟着 MDN 学CSS day_41:显式轨道、隐式网格与区域命名放置
前端·javascript·css·ui·交互
修己xj4 小时前
告别手动存图!这款叫 Fatkun 的浏览器插件,简直是素材收集神器
前端
袋鼠云数栈5 小时前
从前端到基础设施,ACOS 如何打通企业全链路可观测
运维·前端·人工智能·数据治理·数据智能
AskHarries5 小时前
系统提示词、开发者指令和用户输入的优先级
java·前端·数据库
Moment5 小时前
长上下文会最终杀死 Rag 吗?
前端·javascript·后端
qcx235 小时前
【系统学AI】25 论文导读 ①:两篇改变 AI 的开山之作——Attention Is All You Need & ReAct
前端·人工智能·react.js·transformer
kyriewen6 小时前
大文件上传最全指南:分片、断点续传、秒传,一篇就够了
前端·javascript·面试
郑洁文7 小时前
基于Python的Web命令执行漏洞自动化检测系统
前端·python·网络安全·自动化
新酱爱学习7 小时前
手搓 10 个 Skill 后,我把重复劳动收敛成了一套零依赖 CLI 工具
前端·javascript·人工智能