【问题标题】:How to place images instead placeholders wordpress with bootstrap如何使用引导程序放置图像而不是占位符 wordpress
【发布时间】:2017-11-26 07:27:36
【问题描述】:

我需要使用引导模板在 Wordpress 中的主题中放置图像而不是灰色占位符图像。如何自动插入? 请问,您能否附上包含相关信息的链接?

【问题讨论】:

  • 您能否提供指向您使用此主题的网站的链接?或代码示例,如果离线工作。

标签: wordpress twitter-bootstrap image placeholder


【解决方案1】:

我认为这会对您有所帮助,但此解决方案使用了 jQuery,

$('.member a').each(function() {
        var text = $(this).text();    
        if(text == 'Unlock'){
            $(this).html(text.replace('Unlock', "<img src='"+templateUrl+"/image/unblck.png'"+" />"));      
        }else{
            $(this).html(text.replace('lock', "<img src='"+templateUrl+"/image/blck.png'"+" />"));
        }
    });

【讨论】:

    猜你喜欢
    • 2017-06-17
    • 2019-07-13
    • 1970-01-01
    • 2021-08-22
    • 2018-06-18
    • 2016-03-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多