highlight demo

简介: highlight demo

官方网站:

highlight.js

源码下载:

highlight.zip - 蓝奏云

CDN:

<link rel="stylesheet"
      href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>

DEMO

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet"
          href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css">
    <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
    <script>hljs.highlightAll();</script>
</head>
<body>
<pre><code class="lang-java">
  using (StreamReader sr = new StreamReader(file.FullName, FileEncoding.GetType(file.FullName)))
    {
        string sTemp = string.Empty;
        string sCurEncode = sr.CurrentEncoding.EncodingName;
        model.SITEMAP_ENCODING = sCurEncode;
    }
</code></pre>
</body>
</html>

效果图

 

目录
相关文章
|
10月前
|
容器
layui框架实战案例(23):在layui-tab-content中layui-progress-bar在html拼接中不显示lay-percent的解决方案
layui框架实战案例(23):在layui-tab-content中layui-progress-bar在html拼接中不显示lay-percent的解决方案
229 0
|
2天前
|
前端开发
css教程-li的list-style-type属性
通过设置 `list-style-type`属性,你可以根据需求为列表项设置不同的标志样式,从而改变列表的外观。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
17 4
|
7月前
191Echarts - 自定义系列(Custom Bar Trend)
191Echarts - 自定义系列(Custom Bar Trend)
21 0
|
2天前
highlight.line-numbers.js下载及使用
highlight.line-numbers.js下载及使用
35 1
|
小程序
【微信小程序】tabbar报错Component is not found in path “custom-tab-bar/index“
【微信小程序】tabbar报错Component is not found in path “custom-tab-bar/index“
286 0
使用antd-theme-webpack-plugin报错Error LessError: Cannot find module ‘antd/lib/style/themes/default.less
使用antd-theme-webpack-plugin报错Error LessError: Cannot find module ‘antd/lib/style/themes/default.less
915 0
使用antd-theme-webpack-plugin报错Error LessError: Cannot find module ‘antd/lib/style/themes/default.less
|
缓存 前端开发 JavaScript
实现一个 Code Pen:(二)在 Next.js 中使用 Monaco Editor
Monaco Editor 是 VS Code 中使用的开源代码编辑器, 拥有代码高亮和代码自动补全的功能,本文介绍 Monaco Editor 的加载方式和 React 组件封装
823 0
在StackBlitz项目里直接preview某个component的template
在StackBlitz项目里直接preview某个component的template
254 0
在StackBlitz项目里直接preview某个component的template
ng-repeat part1 - how UI is rendered from {{name}} to actual value
ng-repeat part1 - how UI is rendered from {{name}} to actual value
ng-repeat part1 - how UI is rendered from {{name}} to actual value
使用工具快速找出custom work center使用的ui component
使用工具快速找出custom work center使用的ui component
110 0
使用工具快速找出custom work center使用的ui component