【问题标题】:Adding a URL to a Photoswipe image caption将 URL 添加到 Photoswipe 图像标题
【发布时间】:2016-06-09 12:01:23
【问题描述】:

如何将 url 添加到 Photoswipe 图片标题中? 我尝试过的一切都会阻止Photoswipe正常工作。 我想添加一个指向摄影师网站的链接。

【问题讨论】:

    标签: photoswipe


    【解决方案1】:

    在项目的标题属性中使用 HTML 就可以了。

    var $title = '<span><a href="https://domain.tld">Go to domain.tld</a></span>';
    var item = {
                src   : ...,
                w     : ...,
                h     : ...,
                title : $title
               };
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-09-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-21
      • 2017-07-31
      • 1970-01-01
      相关资源
      最近更新 更多