[Code] Màu Cho Các Thẻ Code
Trang 1 trong tổng số 1 trang • Share
[Code] Màu Cho Các Thẻ Code
Demo:
[You must be registered and logged in to see this image.]
Hướng dẫn:
Tạo 1 trang Javascript với (ACP >>Modules >> JavaScript codes management)
Title: Màu cho thẻ code
Placement: In the topic
Tiếp theo là quăng đoạn này vào CSS (ACP >> Display > Colors > CSS stylesheet)
[You must be registered and logged in to see this image.]
Hướng dẫn:
Tạo 1 trang Javascript với (ACP >>Modules >> JavaScript codes management)
Title: Màu cho thẻ code
Placement: In the topic
- Code:
$(function(){var a=$("dl.codebox dd").find("code, div.cont_code");0!=a.length&&$.ajax({url:"http://yandex.st/highlightjs/8.0/highlight.min.js",cache:!0,dataType:"script",success:function(){hljs.configure({useBR:!0});a.each(function(a,b){hljs.highlightBlock(b)})}})});
Tiếp theo là quăng đoạn này vào CSS (ACP >> Display > Colors > CSS stylesheet)
- Code:
/* Màu sắc cho thẻ code */
.hljs {
display: inline-block;
padding: 0.5em;
color: #333;
background: #f8f8f8;
}
.hljs-comment,
.hljs-template_comment,
.diff .hljs-header,
.hljs-javadoc {
color: #998;
font-style: italic;
}
.hljs-keyword,
.css .rule .hljs-keyword,
.hljs-winutils,
.javascript .hljs-title,
.nginx .hljs-title,
.hljs-subst,
.hljs-request,
.hljs-status {
color: #333;
font-weight: bold;
}
.hljs-number,
.hljs-hexcolor,
.ruby .hljs-constant {
color: #099;
}
.hljs-string,
.hljs-tag .hljs-value,
.hljs-phpdoc,
.tex .hljs-formula {
color: #d14;
}
.hljs-title,
.hljs-id,
.coffeescript .hljs-params,
.scss .hljs-preprocessor {
color: #900;
font-weight: bold;
}
.javascript .hljs-title,
.lisp .hljs-title,
.clojure .hljs-title,
.hljs-subst {
font-weight: normal;
}
.hljs-class .hljs-title,
.haskell .hljs-type,
.vhdl .hljs-literal,
.tex .hljs-command {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-tag .hljs-title,
.hljs-rules .hljs-property,
.django .hljs-tag .hljs-keyword {
color: #000080;
font-weight: normal;
}
.hljs-attribute,
.hljs-variable,
.lisp .hljs-body {
color: #008080;
}
.hljs-regexp {
color: #009926;
}
.hljs-symbol,
.ruby .hljs-symbol .hljs-string,
.lisp .hljs-keyword,
.tex .hljs-special,
.hljs-prompt {
color: #990073;
}
.hljs-built_in,
.lisp .hljs-title,
.clojure .hljs-built_in {
color: #0086b3;
}
.hljs-preprocessor,
.hljs-pragma,
.hljs-pi,
.hljs-doctype,
.hljs-shebang,
.hljs-cdata {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.diff .hljs-change {
background: #0086b3;
}
.hljs-chunk {
color: #aaa;
}
This tutorial was written by the staff of the [You must be registered and logged in to see this link.], and translated by [You must be registered and logged in to see this link.]. |
[You must be registered and logged in to see this image.]
HelpsFMvi- Ban Quản Trị FMvi
- Số bài : 104
HelpsPoints : 15528
Likes : 33
Ngày tham gia : 10/03/2016
Trạng thái :Online Offline
Tuổi : 26
Location : Ninh Thuận
[Click để xem tài sản HelpsFMvi]
Similar topics
» [Code] Nút lên đầu trang
» [Code] Nút like và dislike
» [Code] Tùy chọn màu cho forum
» [Code] Menu dọc cho phbb2
» [Code] Tạo Widget Đồng Hồ
» [Code] Nút like và dislike
» [Code] Tùy chọn màu cho forum
» [Code] Menu dọc cho phbb2
» [Code] Tạo Widget Đồng Hồ
Trang 1 trong tổng số 1 trang
Permissions in this forum:
Bạn không có quyền trả lời bài viết
|
|