过去一年半我一直在使用 cufon,但从未见过这个......
说我有:
<h2 class="my_font">This is some text</h2>
<p class="my_font">This is some more text</p>
文本正确呈现,但换行符被呈现为新行,例如:
<h2 class="my_font"><cufon class="cufon cufon-canvas" alt=" " style="width: 5px; height: 16px; ">...</cufon</h2>
<cufon class="cufon cufon-canvas" alt=" " style="width: 5px; height: 16px; ">...</cufon>
<p class="my_font"><cufon class="cufon cufon-canvas" alt=" " style="width: 5px; height: 16px; ">...</cufon</p>
所以我最终在 h2 和 p 标签之间有 16px 的间隙。我唯一能做的就是将所有内容放在同一行或注释掉换行符:
<h2 class="my_font">This is some text</h2><!--
--><p class="my_font">This is some more text</p>
另外,我认为重要的是要提到这发生在使用 cufon 的任何地方,它并不孤立于上面的 html 示例。知道是什么原因造成的吗?
谢谢!