I'm using prettify.js for some blog posts. It's handling my html, python, and js fine, but missing the css.
My html is:
<pre>
<code class="prettyprint lang-css">`
.my-boxclass {
display: inline-block;
position: relative;
cursor: help;
border-bottom: 1px dotted grey;
}
</code>
</pre>
and I'm importing prettify. Here's a jsfiddle of exactly what I'm doing (and it's not syntax highlighting the jsfiddle correctly either) https://jsfiddle.net/kfdqLjm1/2/
You need to load the CSS language handler. Try adding ?lang=css
after run_prettify.js
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.