L o a d i n g . . .
主打一个C++
文章详情

html中点击一个按钮从页面底部动画弹出一个窗口

Posted on 2017-02-14 20:45:31 by 主打一个C++

<style>
    .wx_mn_popup {
        position: fixed;
        bottom: -220px;
        /* 初始状态在底部下方 */
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        height: 220px;
        background-color: white;
        border: 1px solid #ccc;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        text-align: center;
        padding: 20px;
        transition: bottom 0.5s ease;
        background-color: #fff;
    }

    .wx_mn_popup.wx_mn_open {
        bottom: 0;
    }

    .wx_mn_popup_button {
        margin-top: 20px;
    }
</style>
<div id="wx_mn_popup" class="wx_mn_popup">
    <p>这里是弹出窗口的内容。</p>
</div>

<script>
    const g_weixin_money_popup = document.getElementById('wx_mn_popup');
    function open_weixin_money(open = true) {
        console.log(open);
        open ? g_weixin_money_popup.classList.add('wx_mn_open') : g_weixin_money_popup.classList.remove('wx_mn_open');
    }
</script>

调用

open_weixin_money()


*转载请注明出处:原文链接:https://cpp.vin/page/135.html

作者近期文章
提示
×
确定
数据库执行: 8次 总耗时: 0.01s
页面加载耗时: 



wechat +447752296473
wechat cpp-blog