是否有一个插件可以在我的网页中显示HTML代码 [英] Is there a plugin to display HTML code inside my web page

查看:456
本文介绍了是否有一个插件可以在我的网页中显示HTML代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的页面中显示大块LESS文件。我希望它看起来尽可能好,以便看到它的用户可以轻松阅读。

I want to display large chunk of LESS file in my page. I want it to look as nice as possible so that users who see it will read it easily.

stackoverflow让我显示它(例如)像这样:

stackoverflow let me display it (for example) like this:

header {
    color: red;
    div.myClass {
         color:blue;
    }
}

但是有一个插件可以更好地显示它吗?我的意思是:div将以蓝色显示,类将以红色显示,变量将以粗体显示等...

but is there a plugin to display it nicer? I mean: div will be displayed in blue and class will be displayed in red, variables will be bold etc...

是否存在某种javascript或jQuery库是吗?

Is there some sort of javascript or jQuery library that does it?

谢谢,
Alon

thanks, Alon

推荐答案

StackOverflow使用 Prettify 来进行语法突出显示。

StackOverflow uses Prettify to do it's syntax highlighting.

它应该适用于你想要的东西。

It should work for what you want.

这篇关于是否有一个插件可以在我的网页中显示HTML代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆