How to display web code on a static page and highlight it like this_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:12:51
Original
1576 people have browsed it


Thank you, please give me some advice. The color of each block of the displayed code is different, and the color of the highlight is different for different codes.


Reply to the discussion (solution)

css first defines all the keyword styles for reference.
When the user selects it, it will be displayed. Use js to judge. If the code includes content in the definition, highlight

code highlighting plug-in?

http://paranimage.com/6-javascript-code-highlighting-plugins/

This can be achieved with JS or JQ

Are you a blogger? Or a website? For blogs, you can find plug-ins, and for websites, use JS. .

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template