有没有人知道如何在模型框中打开LightGallery中的图像描述中添加超链接?
我的代码是:
<div id="portfolio-wrap" class="padding-sec-lg">
<ul id="portfolio" class="auto-construct project-gallery" data-col="2">
<li class="item" data-src="img/Nicky.jpg" data-sub-html="<h6>Graphic Designer Site</h6><p>A website I created for a graphic designer to showcase their work. Visit nicky.alexedmead.com for live site. </p>" >
<a href="http://www.alexedmead.com" target="_blank">
<img class="img-responsive" src="img/Nicky.jpg" alt="Image description" />
<span class="hover-cap">Graphic Designer Site</span>
</a>
</li>
答案 0 :(得分:0)
您可以在anchor
属性
data-sub-html
标记
<div id="portfolio-wrap" class="padding-sec-lg">
<ul id="portfolio" class="auto-construct project-gallery" data-col="2">
<li class="item" data-src="img/Nicky.jpg" data-sub-html="<h6>Graphic Designer Site</h6><p>A website I created for a graphic designer to showcase their work. Visit <a href='http://www.alexedmead.com' target='_blank'>alexedmead.com</a> for live site. </p>" >
<a href="http://www.alexedmead.com" target="_blank">
<img class="img-responsive" src="img/Nicky.jpg" alt="Image description" />
<span class="hover-cap">Graphic Designer Site</span>
</a>
</li>
答案 1 :(得分:0)
是的,你是对的,我最终发现锚属性需要使用单引号(&#39;&#39;)而不是双引号(&#34;&#34; ;)