bootstrap code (1)

It is generally used more frequently on personal blogs to display the style of the code. Bootstrap mainly provides three code styles :
1. Use <code></code> to display single-line inline code
2. Use <pre></pre> to display multi-line block code
3. Use <kbd></ kbd> to display user input code

The precompiled version of Bootstrap extracts the styles of the code separately:
1. For LESS version, please refer to the code.less file
2. For Sass version, please refer to the _code.scss file.
Please refer to line 688 of the bootstrap.css file for the compiled CSS code ~ Line 730, because the code is too long, I will not list them all here.

When using code, users can use different types according to their specific needs:
1. <code> : generally for a single word or single sentence code
2. <pre> : generally for multiple lines of code (that is, block code)
3. <kbd> : Generally, it indicates the content that the user wants to input through the keyboard

Although different types have different styles, their usage is similar.
code style:

<div>Bootstrap的代码风格有三种:
  <code><code></code>
  <code><pre></code>
  <code><kbd></code>
</div>

pre-style:

<div>
<pre>
<ul>
<li>...</li>
<li>...</li>
<li>...</li>
</ul>
</pre>
</div>

kbd style:

<div>Please type <kbd> ctrl+c </kbd> to copy the code, then use <kbd> ctrl+v </kbd> to paste the code</div>

No matter which coding style is used, use hard-coded " < " for the less than sign (<) in the code, and " & gt ; " for the greater than sign (>) . And for the <pre> code block style, how many spaces are left in front of the tag will be left in the display effect.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325765481&siteId=291194637