页面页脚部分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>
相关推荐
Jcode11几秒前
Web Component如何手动处理父子组件的生命周期
前端
Python_金钱豹6 分钟前
Text2SQL零代码实战!RAGFlow 实现自然语言转 SQL 的终极指南
前端·数据库·sql·安全·ui·langchain·机器人
兜小糖的小秃毛20 分钟前
两段文本比对,高亮出差异部分
linux·前端·javascript
佛系菜狗29 分钟前
element-ui、element-plus表单resetFields()无效的坑
前端·javascript·vue.js
爱的叹息1 小时前
【前端】基于 Promise 的 HTTP 客户端工具Axios 详解
前端·网络·网络协议·http
一个天蝎座 白勺 程序猿1 小时前
Python爬虫(4)CSS核心机制:全面解析选择器分类、用法与实战应用
css·爬虫·python
遗憾随她而去.1 小时前
从 0 开始认识 WebSocket:前端实时通信的利器!
前端·websocket·网络协议
老兵发新帖2 小时前
pnpm常见报错解决办法
前端
Sonetto19992 小时前
Nginx 反向代理,啥是“反向代理“啊,为啥叫“反向“代理?而不叫“正向”代理?它能干哈?
运维·前端·nginx
沐土Arvin2 小时前
理解npm的工作原理:优化你的项目依赖管理流程
开发语言·前端·javascript·设计模式·npm·node.js