xhtml看不到<pre><code> as text</code></pre>

时间:2012-12-22 16:08:34

标签: html xhtml epub

我有问题,我想写一本epub书。我看到它使用xhtml。我想制作类似stackoverflow代码块的东西。这是我的CSS代码:

pre{
font-size: 1em;
line-height: 1.5em;
background: #EEE;
padding: .75em;
margin: 1.5em 0 1.5em 0;
font-family: "Courier New",Courier,monospace;
font-family: Verdana, Geneva, sans-serif;
color: #666;
}

我的HTML代码:

<pre><code></code></pre>

我尝试使用“引号”和“撇号”,但我目前使用的Sigil将其视为HTML代码,并给我错误。

请帮帮我。

1 个答案:

答案 0 :(得分:0)

您应该将<转移到“代码块”内&lt;。或者您可以在<![CDATA[ ... ]]>块中包围代码块。