一个网页底部装饰代码

小世界 (UID: 40) [复制链接]
帖子链接已复制到剪贴板
帖子已经有人评论啦,不支持删除!

751 10

效果图:  

直接上代码:

<div class="footer-perch"> <div id="footer-animal"> <div class="animal-wall"></div> <img class="animal entered loaded" src="动物图片地址" alt="动物" data-ll-status="loaded"> </div></div>

动物图片(右键保存):

/* 底部元素布局 */
#footer-banner {
    order: 999;
}

.footer-perch {
    height: 10px;
    display: flex;
    flex-direction: column;
    order: 1;
}

#footer-animal {
    position: relative;
    width: 100%;
    margin-top: auto;
    top: 1rem;
}

#footer-animal .animal-wall {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 20px;
    background: #bcb0a4 url(背景墙地址) repeat center;
    background-size: auto 100%;
    box-shadow: 0 4px 7px rgba(0, 0, 0, .15);
}

@media screen and (max-width: 1023px) {
    #footer-animal .animal-wall {
        height: min(36px, 4vw);
    }
}

#footer-animal img.animal {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(500px, 100vw);
    display: block;
}

/* 去除多余的 !important */
#footer-bar {
    margin-top: 0;
}

背景墙图片(右键保存):

可能不适用所有网站 自己根据实际来调整吧

演示站:https://www.wnooo.cn 滑倒底部看效果

防止图片失效 图片建议自己放到本地使用

嘿嘿嘿
已有评论 ( 10 )
提示:您必须 登录 才能查看此内容。
创建新帖
自助推广点击空位自助购买TG联系
确认删除
确定要删除这篇帖子吗?删除后将无法恢复。
删除成功
帖子已成功删除,页面将自动刷新。
删除失败
删除帖子时发生错误,请稍后再试。