页面页脚部分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>
相关推荐
刘 怼怼10 分钟前
【520 特辑】用 HTML/CSS/JavaScript 打造浪漫炫酷的表白网页
javascript·css·html
_龙小鱼_10 分钟前
Vue响应式系统演进与实现解析
前端·vue.js
哎呦你好31 分钟前
CSS 选择器入门
开发语言·前端·css·html
云隙阳光i37 分钟前
Vue3 中使用 provide/inject 实现跨层级组件传值失败的原因及解决方案
前端·javascript·vue.js
资深前端之路42 分钟前
vue+three.js 五彩烟花效果封装+加载字体
前端·javascript·vue.js
alicema11111 小时前
matlab+opencv车道线识别
前端·opencv·matlab
火星牛2 小时前
SPA模式下的es6如何加快宿主页的显示速度
前端·ecmascript·es6
疏狂难除2 小时前
【Tauri2】046—— tauri_plugin_clipboard_manager(一)
前端·clipboard·tauri2
污斑兔2 小时前
VMWare清理后,残留服务删除方案详解
前端
gong191723169672 小时前
非受控组件在React中的使用场景有哪些?
前端·javascript·react.js