页面页脚部分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>
相关推荐
wang_book1 小时前
uniapp学习(003-1 vue3学习 Part.1)
前端·学习·微信小程序·小程序·uni-app·vue
一一程序1 小时前
uniapp实现图片上下浮动效果
前端·uni-app·动画·animation
安冬的码畜日常1 小时前
【CSS in Depth 2 精译_041】6.4 CSS 中的堆叠上下文与 z-index(上)
前端·css·css3·html5·css定位·z-index·元素堆叠
花开不识君1 小时前
Chrome Cookie最大有效期
前端·chrome
小白求学11 小时前
CSS链接
前端·css
太阳火神的美丽人生2 小时前
WeChat_DevTools 断点调试方法总结
java·前端·微信
魏时烟3 小时前
vue3项目中组件切换不起作用
前端·javascript·vue.js
剑亦未配妥3 小时前
前端项目场景相关的面试题,包含验证码、图片存储、登录鉴权、动态路由、组件划分等项目场景实际的面试题
前端
先知demons3 小时前
超好用的element的el-pagination分页组件二次封装-附源码及讲解
前端·javascript·vue.js·elementui·html
emmm4593 小时前
前端DOM常用操作
前端·javascript