Get to know MDN better
此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。
css 属性 border-top-width 是用于设置盒模型的上边框的宽度
上边框的宽度属性的有效值要么是一个具体的非负数,要么是一个关键字。如果是关键字,必须是一下几种:
| medium | A medium border | |
| thick | A thick border |
备注:Because the specification doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific. Nevertheless, they always follow the pattern thin ≤ medium ≤ thick, and the values are constant within a single document.
| CSS Backgrounds and Borders Module Level 3 # border-width |
| medium |
| 所有元素. It also applies to ::first-letter. |
| 否 |
| 绝对长度;或如果 border-top-style 的值为 none 或 hidden,则为 0 |
| a length |
启用 JavaScript 以查看此浏览器兼容性表。