Basic Usage

The recommended way to mark up a code block (both for semantics and for Prism) is a <pre> element with a element <code> inside, like so:

Code:

                                            

<pre>

    <code class="language-css">

        p {

            color: #1abc9c

        }

    </code>

</pre>

                                            

                                        
Output:

p {

    color: #1abc9c

}
HTML Markup

Use the following code to use HTML syntax highlighter.

Usage:

                                                

<pre>

    <code class="language-markup">

        HTML CODE ...

    </code>

</pre>

                                                

                                            
Example:

                                                

<div class="card">

    <div class="card-header">

        <h5>Hello card</h5>

        <span> lorem ipsum dolor sit amet, consectetur adipisicing elit</span>

        <div class="card-header-right">

            <i class="icofont icofont-rounded-down"></i>

            <i class="icofont icofont-refresh"></i>

            <i class="icofont icofont-close-circled"></i>

        </div>

    </div>

    <div class="card-body">

        <p>

            "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

        </p>

    </div>

</div>

                                                

                                            
CSS Markup

Use the following code to use HTML syntax highlighter.

Usage:

                                            

<pre>

    <code class="language-css">

        CSS CODE ...

    </code>

</pre>

                                            

                                        
Example:

                                            

a:active{

    color:#1abc9c;

}

p{

    font-size:13px;

}

.btn-primary{

    color: #1abc9c;

    background-color: #fff;

}

.label-primary {

    background-color: #1abc9c;

}

.badge-primary {

    background-color: #1abc9c;

}

.bg-primary {

    background-color: #1abc9c !important;

    color: #fff;

}

.panel-primary {

    border-color: #1abc9c;

}

                                            

                                        
Line Number

Line number at the beginning of code lines.

Obviously, this is supposed to work only for code blocks (<pre><code>) and not for inline code. Add class line-numbers to your desired <pre> and line-numbers plugin will take care.

Optional: You can specify the data-start (Number) attribute on the <pre> element. It will shift the line counter.

Usage:

                                            

<pre class="line-numbers">

    <code class="language-css">

        p {

            color: red;

        }



    </code>

</pre>

                                            

                                        
Example:

                                            

(function() {

    if (typeof self==='undefined' || !self.Prism || !self.document) {

        return;

    }

});

                                            

                                        
Line Highlight

Highlights specific lines and/or line ranges.

You specify the lines to be highlighted through the data-line attribute on the <pre> element, in the following simple format:

  1. A single number refers to the line with that number
  2. Ranges are denoted by two numbers, separated with a hyphen (-)
  3. Multiple line numbers or ranges are separated by commas.
  4. Whitespace is allowed anywhere and will be stripped off.
Usage:

                                            

<pre data-line="2,4, 8-10">

    <code class="language-css">

        p {

            color: red

        }

    </code>

</pre>

                                            

                                        
Example:

											

pre.line-numbers {

    position: relative;

    padding-left: 3.8em;

    counter-reset: linenumber;

}



pre.line-numbers > code {

    position: relative;

}



.line-numbers .line-numbers-rows {

    position: absolute;

    pointer-events: none;

    top: 0;

    font-size: 100%;

    left: -3.8em;

    width: 3em;

    /* works for line-numbers below 1000 lines */

    letter-spacing: -1px;

    border-right: 1px solid #999;

    -webkit-user-select: none;

    -moz-user-select: none;

    -ms-user-select: none;

    user-select: none;

}

                                            

                                        

彩票高手实战分享平台

欢迎来到彩票高手实战分享平台,这里专注于最新快3玩法的深入分析与经验分享。我们汇聚众多彩票爱好者的实战心得,提供避坑攻略,确保每位用户在购彩时能更加理智和科学。无论您是新手还是老手,都能在这里找到有价值的信息,提升您的购彩水平。加入我们,一起探索彩票的精彩世界,掌握最新动态与技巧,成就更好的自己