博客右下角限时VIP

代码
<!--LOGO变色-顾熙博客 blog.a686.de-->
<style>.navbar-logo{animation: hue 4s infinite;}@keyframes hue {from {filter: hue-rotate(0deg);}to {filter: hue-rotate(-360deg);}}</style>

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>悬浮图片示例</title>
    <style>
        /* 默认样式,适用于所有设备 */
        .floating-image {
            display: none; /* 默认隐藏悬浮图片 */
        }
        .close-button {
            /* 关闭按钮样式 */
            position: absolute;
            top: 5px;
            right: 5px;
            width: 30px;
            height: 30px;
            background-color: #f00;
            border-radius: 50%;
            text-align: center;
            line-height: 30px;
            color: #fff;
            font-size: 18px;
            cursor: pointer;
        }
        /* 媒体查询,针对桌面设备显示悬浮图片 */
        @media screen and (min-width: 768px) { /* 以常见的平板横屏分辨率为分界点 */
            .floating-image {
                position: fixed;
                right: 20px;
                bottom: 20px;
                z-index: 999;
                display: block; /* 显示悬浮图片 */
            }
        }
    </style>
</head>
<body>
    <!-- 悬浮图片容器 -->
    <div class="floating-image">
        <!-- 图片 -->
        <a class="float-btn pay-vip"  target="_blank">
        <img src="https://js.al886.cn/2024/07/20240709020603783.gif" alt="悬浮图片" style="width: 200px; height: auto;"> <!-- 调整宽度为200px,高度自动调整以保持比例 -->
        <!-- 关闭按钮 -->
        <div class="close-button" onclick="closeFloatingImage()">×</div> <!-- 点击关闭按钮隐藏悬浮图片 -->
    </div>
    <!-- JavaScript 用于隐藏悬浮图片 -->
    <script>
        function closeFloatingImage() {
            document.querySelector('.floating-image').style.display = 'none'; //隐藏悬浮图片容器
        }
    </script>
</body>
</html>

将上述代码加入子比全局自定义底部HTML代码中即可

图片[1]-博客-技术-分享-免费博客右下角限时VIP
------本页内容已结束,喜欢请分享------

感谢您的来访,获取更多精彩文章请收藏本站。

文章版权声明 1 本网站名称:顾熙博客
2 本站永久网址:https://blog.a686.de
3 本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长 QQ407177932进行删除处理。
4 本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
5 本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
6 本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
© 版权声明
THE END
喜欢就支持一下吧!
点赞7赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容