简体   繁体   English

有人帮我在 100% 后创建一个 wordpress 进度条和文本或图像显示吗?

[英]Anyone help me to create a wordpress progress bar and text or image show after 100%?

After completing the progress bar up to 100% then hide the progress bar and then show an image or link or button.完成进度条达到 100% 后,隐藏进度条,然后显示图像或链接或按钮。

Please share your expertices.请分享您的专业知识。

I made something You can see the example in this link And that my code is as follows:我做了一些东西你可以在这个链接中看到这个例子我的代码如下:

html code: html代码:

<div class="contet">

<div class="panel panel-default counter-panel card">
    <div class="panel-body text-center card-body" id="__procon">
        <div id="wpdm_lazy_download_" class="progress progress-striped active">
            <div class="progress-bar progress-bar-success progress-bar-striped  progress-bar-animated"
                 role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
                <span class="sr-only">Please Wait...</span>
            </div>
        </div>
    </div>
    <div id="wpdmw8" class="panel-footer card-footer">Please Wait...</div>
</div>

css code: CSS代码:

.contet {
    max-width: 50%;
    margin: 50px auto;
    display: block;
    text-align: center;
    box-shadow: 0 0 10px #00000017;
    border-radius: 8px;
    padding: 50px;
}

.card {
    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: 0.25rem;
}

.counter-panel {
    width: 400px;
    max-width: 90%;
    margin: 10px auto;
}

.counter-panel .panel-body {
    padding: 15px;
}

.counter-panel .progress {
    height: 50px;
    border-radius: 3px;
    margin: 0;
}

.counter-panel .circle {
    font-family: 'Courier Prime', monospace;
    font-size: 40pt;
    color: #000;
    letter-spacing: 1px;
}

.counter-panel .panel-footer {
    font-family: 'Courier Prime', monospace;
    text-align: center;
    letter-spacing: 1px;
}

@-webkit-keyframes progress-bar-stripes {
    from {
        background-position: 1rem 0;
    }
    to {
        background-position: 0 0;
    }
}

@keyframes progress-bar-stripes {
    from {
        background-position: 1rem 0;
    }
    to {
        background-position: 0 0;
    }
}

.progress {
    display: -ms-flexbox;
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.progress-bar {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-pack: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: #4a8eff;
    transition: width 0.6s ease;
}

@media (prefers-reduced-motion: reduce) {
    .progress-bar {
        transition: none;
    }
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    -webkit-animation: progress-bar-stripes 1s linear infinite;
    animation: progress-bar-stripes 1s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .progress-bar-animated {
        -webkit-animation: none;
        animation: none;
    }
}

.btn {

    text-transform: uppercase;
    color: #fff;
    background-color: #4a8eff;
    border-color: #4a8eff;
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    line-height: 1.5;
    border-radius: 0.3rem;
    display: block;
}

.card-footer:last-child {
    border-radius: 0 0 calc(0.25rem - 1px) calc(0.25rem - 1px);
}
.counter-panel .panel-footer {
    font-family: 'Courier Prime', monospace;
    text-align: center;
    letter-spacing: 1px;
}
.panel-footer {
    color: #555555;
}

jQuery code: jQuery代码:

jQuery(function ($) {
    $("#wpdm_lazy_download_ .progress-bar").animate({width: "100%"}, -1000, function () {
        //jQuery.cookie("wpdm_lazy_download_'.$lazy_download_id.'","-1", { expires: 1, path: "/" });
        var d = new Date();
        var n = d.getMilliseconds();

        setTimeout(
            function () {
                $('#wpdmw8').html('Your Download is Ready!');
                $('#__procon').html("<a href='' class='btn btn-primary btn-block btn-lg'>Download</a>");

            }, 1000);


    });
});

Wherever it was difficult to tell me to check.哪里很难告诉我检查。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WordPress自定义进度条 - Wordpress Custom Progress Bar 在Wordpress短代码中为Woocommerece小部件创建动态“免费送货”进度条 - Create a dynamic “Free Shipping” Progress bar for Woocommerece widget in Wordpress shortcode WordPress进度栏加载速度快,加载后不会消失 - WordPress Progress Bar loading to fast and not disappearing after loading 如何在 Wordpress 上将文本主页更改为图标主页? 请帮我 - How to change text Home to icon Home on Wordpress? Please help me 如何在Wordpress中为每个页面的一个模板更改动态标题图像? 如果有人可以为4.4版本的wordpress提供帮助 - How to Change the dynamic header image for the one template for each page in wordpress? If anyone can help for 4.4 version of wordpress 带有进度条的Wordpress管理页面 - Wordpress admin page with progress bar 滚动进度条在 Wordpress 中不起作用 - Progress bar on scroll not working in Wordpress 使用文本链接打开 tawk.to 的小部件聊天时出现问题..谁能帮我解决这个问题? - Problem in using text link to open widget chat of tawk.to ..Can anyone help me with this? 谁能告诉我如何创建如图所示的垂直线 - Can anyone tell me how do I create a vertical line as shown in the image 如何使bootstrap进度栏动态为wordpress - how to make bootstrap progress bar dynamic for wordpress
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM