页面页脚部分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>
相关推荐
明远湖之鱼30 分钟前
浅入理解流式SSR的性能收益与工作原理
前端·ios
IT_陈寒1 小时前
Python性能提升50%:这5个隐藏技巧让你的代码快如闪电⚡
前端·人工智能·后端
懒人村杂货铺1 小时前
微前端QianKun的使用以及坑点问题
前端
qq_366577511 小时前
Vue3创建项目,只能localhost访问问题处理
前端·javascript·vue.js
一个处女座的程序猿O(∩_∩)O2 小时前
React Router 路由模式详解:HashRouter vs BrowserRouter
前端·react.js·前端框架
Caster_Z2 小时前
WinServer安装NPM(Nginx Proxy Manager),并设置反向代理和开启https
前端·nginx·npm
顾安r2 小时前
11.22 脚本 手机termux项目分析(bash)
前端·python·stm32·flask·bash
是你的小橘呀3 小时前
JavaScript 原型链解密:原来 proto 和 prototype 这么好懂
前端·javascript·前端框架
ohyeah3 小时前
使用 LocalStorage 实现本地待办事项(To-Do)列表
前端·javascript
Jing_Rainbow3 小时前
【前端三剑客-6/Lesson11(2025-10-28)构建现代响应式网页:从 HTML 到 CSS 弹性布局再到 JavaScript 交互的完整指南 🌈
前端·javascript