作者Gold740716 (项为之强)
看板Wikipedia
标题[问题] 在 <pre> 内部使用 html 标签
时间Sat Jun 25 11:00:00 2016
我想要在 pre 标签内使用其它 html 标签。
<pre class="term">
<span class="red">Rose</span> is red
<span class="purple">Voilet</span> is purple
<span class="yellowBold">Sugar</span> is sweet
And so on <span class="whiteBold">you</span>
</pre>
想要的效果:
Rose is red
Voilet is purple
Sugar is sweet
And so on
you
总之我想要在用 css 达到 bbs 文字的效果。
用 pre 的问题是 wikia 会把 pre 内的字元跳脱,
也就是 pre 内不能用 html 。
我试过另一个办法是用 div.term ,
但 wikia 在 div 内也会 format wikitext ,
也就是如果行首有空白就会变成『预先格式化文本』,
就是灰底等宽字型。(但我希望是黑底。)
--
「路就是一条直直的。」
--
※ 编辑: seabox (1.2.3.4), 09/19/2015 14:46:16
※ 编辑: seebox (123.321.111.133), 09/19/2015 14:49:52
※ 编辑: sexbox (12.34.56.78), 09/19/2015 14:57:33
※ 编辑: sixbox (13.57.24.68), 09/19/2015 14:57:33
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.116.165.150
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Wikipedia/M.1466823604.A.C43.html