English 中文(简体)
采用<font则=”#xxx”的超文本
原标题:Highlight code in HTML using <font color="#xxx">

我想知道,如何以超文本形式强调我的准则。

<font color="#1773cc">#include </font><font color="#4a6f8b">&lt;NTL/ZZ.h&gt;</font><br>
<br>
<font color="#b02f60"><b>using</b></font>&nbsp;<font color="#008b00"><b>namespace</b></font>&nbsp;std;<br>
<font color="#b02f60"><b>using</b></font>&nbsp;<font color="#008b00"><b>namespace</b></font>&nbsp;NTL;<br>
<br>
<font color="#008b00"><b>int</b></font>&nbsp;main()<br>
{<br>
&nbsp;&nbsp; ZZ a, b, c; <br>
<br>
&nbsp;&nbsp; cin &gt;&gt; a; <br>
&nbsp;&nbsp; cin &gt;&gt; b; <br>
&nbsp;&nbsp; c = (a+<font color="#ff8b00">1</font>)*(b+<font color="#ff8b00">1</font>);<br>
&nbsp;&nbsp; cout &lt;&lt; c &lt;&lt; <font color="#4a6f8b">&quot;</font><font color="#8a2ae2">
</font><font color="#4a6f8b">&quot;</font>;<br>
}<br>

载于https://libntl.org/doc/tour-ex1.html> rel=“nofollow noreferer”>。

Just using <font color="#xxxxxx">xxx<font> to highlight code.
Is there a tool to implement this, or I have to write it by hand?

我曾尝试过一些工具,例如、Typora ,Vim,但不是我想要的。

我愿强调使用<代码><的代码;fontnut=“#xxxx”>xxx<font>的代码。

是否有实施这一工具,或者我是否必须手写?

最佳回答
问题回答

您可以执行自己的辛比特,或使用已经存在的东西。 仅是CSS的一个显要器:。 https://www.csscript.com/css- only-syntax-highlighter/

A preview from CSS:

enter image description here





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签