我正在尝试将外部 API 生成的内容嵌入到网页中。我已经根据需要设置了输出样式,但我希望将其中一个 XMLdiv
读取为 HTML 以创建实时链接。现在,输出只显示带有a
等的原始代码,而不是仅仅将锚点变成锚点。有没有我可以用来告诉浏览器div
作为 HTML 的 CSS 元素?如果不是 CSS,我还能做些什么吗?
<style type="text/css">
.csl-entry {
margin-bottom: 2em;
}
.csl-block {
margin-top: 1em;
padding-left: 4em;
}
</style>
<p>
<font style="line-height:200%">
<?xml version="1.0"?>
<div class="csl-bib-body" style="line-height: 1.35; padding-left: 2em; text-indent:-2em;">
<div class="csl-entry">Attridge, Derek, ed. <i>James Joyce’s Ulysses: A Casebook</i>. Oxford University Press, USA, 2004.</div>
<div class="csl-entry">Gifford, Don, and Robert J. Seidman. <i>Ulysses Annotated: Notes for James Joyce’s Ulysses</i>. 2 Rev Enl. University of California Press, 2008.</div>
<div class="csl-entry">Gilbert, Stuart. <i>James Joyce’s Ulysses: A Study</i>. 2nd ed. Vintage, 1987. <a href=“test”>TEST URL with HTML</a>
<div class="csl-block"><a href=“test”>TEST EXTRA WITH LINK</a>.</div>
</div>
<div class="csl-entry">Joyce, James. <i>Ulysses (Gabler Edition) 1st (first) Edition Text Only</i>, 1986.</div>
<div class="csl-entry">Kenner, Hugh. <i>Ulysses</i>. Revised. The Johns Hopkins University Press, 1987.</div>
</div>
</font>
</p>