0

我将以下内容添加到我的 MPDF 页脚:

<a href="#bottom"><img src="arrowdownred.jpg" width="40" height = "34" />&darr;</a>

它显示得很好,↓ 字符作为链接可以正常工作,但图像却不行!

当我将鼠标悬停在光标上时,光标会发生变化,但单击时它不起作用。

有人有什么想法吗?

4

1 回答 1

1

所以我在 MPDF 论坛深处找到了答案,所以我想我会把它贴在这里:这是一个带有图像链接的错误来修复它,在 mpdf.php,第 18330 行,找到:

 if ($this->HREF) { $objattr['link'] = $this->HREF; }    // ? this isn't used

并替换为:

 if ($this->HREF) {
 if (strpos($this->HREF,".") === false && strpos($this->HREF,"@") !== 0) {
 $href = $this->HREF;
 while(array_key_exists($href,$this->internallink)) $href="#".$href;
 $this->internallink[$href] = $this->AddLink();
 $objattr['link'] = $this->internallink[$href];
 }
 else { $objattr['link'] = $this->HREF; }
 }
于 2012-01-25T21:15:52.077 回答