UTF-8 块元素 详解
HTML基础 2022-06-03 23:45:05小码哥的IT人生shichen
UTF-8 块元素
范围:十进制 9600-9631,十六进制 2580-259F
如果您希望在 HTML 中显示特殊字符,可以使用下表中的 HTML 实体。
如果字符没有 HTML 实体,则可以使用十进制(dec)或十六进制(hex)引用。
示例代码:
<p>我会显示 ▂</p>
<p>我会显示 ▂</p>
将显示为:
我会显示 ▂
我会显示 ▂
完整实例【亲自试一试】:
<!DOCTYPE html>
<html>
<body>
<p>我会显示 ▂</p>
<p>我会显示 ▂</p>
</body>
</html>
可以使用本站在线JavaScript测试工具测试上述代码运行效果:http://www.phpcodeweb.com/runjs.html
较老的浏览器可能不支持下表中的所有 HTML5 实体。
Chrome 和 Opera 的支持是很好的,而 IE 11+ 和 Firefox 35+ 支持所有实体。
字符 | 十进制 | 十六进制 | 实体 | 名称 |
---|---|---|---|---|
▀ | 9600 | 2580 | UPPER HALF BLOCK | |
▁ | 9601 | 2581 | LOWER ONE EIGHTH BLOCK | |
▂ | 9602 | 2582 | LOWER ONE QUARTER BLOCK | |
▃ | 9603 | 2583 | LOWER THREE EIGHTHS BLOCK | |
▄ | 9604 | 2584 | LOWER HALF BLOCK | |
▅ | 9605 | 2585 | LOWER FIVE EIGHTHS BLOCK | |
▆ | 9606 | 2586 | LOWER THREE QUARTERS BLOCK | |
▇ | 9607 | 2587 | LOWER SEVEN EIGHTHS BLOCK | |
█ | 9608 | 2588 | FULL BLOCK | |
▉ | 9609 | 2589 | LEFT SEVEN EIGHTHS BLOCK | |
▊ | 9610 | 258A | LEFT THREE QUARTERS BLOCK | |
▋ | 9611 | 258B | LEFT FIVE EIGHTHS BLOCK | |
▌ | 9612 | 258C | LEFT HALF BLOCK | |
▍ | 9613 | 258D | LEFT THREE EIGHTHS BLOCK | |
▎ | 9614 | 258E | LEFT ONE QUARTER BLOCK | |
▏ | 9615 | 258F | LEFT ONE EIGHTH BLOCK | |
▐ | 9616 | 2590 | RIGHT HALF BLOCK | |
░ | 9617 | 2591 | LIGHT SHADE | |
▒ | 9618 | 2592 | MEDIUM SHADE | |
▓ | 9619 | 2593 | DARK SHADE | |
▔ | 9620 | 2594 | UPPER ONE EIGHTH BLOCK | |
▕ | 9621 | 2595 | RIGHT ONE EIGHTH BLOCK | |
▖ | 9622 | 2596 | QUADRANT LOWER LEFT | |
▗ | 9623 | 2597 | QUADRANT LOWER RIGHT | |
▘ | 9624 | 2598 | QUADRANT UPPER LEFT | |
▙ | 9625 | 2599 | QUADRANT UPPER LEFT AND LOWER LEFT AND LOWER RIGHT | |
▚ | 9626 | 259A | QUADRANT UPPER LEFT AND LOWER RIGHT | |
▛ | 9627 | 259B | QUADRANT UPPER LEFT AND UPPER RIGHT AND LOWER LEFT | |
▜ | 9628 | 259C | QUADRANT UPPER LEFT AND UPPER RIGHT AND LOWER RIGHT | |
▝ | 9629 | 259D | QUADRANT UPPER RIGHT | |
▞ | 9630 | 259E | QUADRANT UPPER RIGHT AND LOWER LEFT | |
▟ | 9631 | 259F | QUADRANT UPPER RIGHT AND LOWER LEFT AND LOWER RIGHT |