border-top

介绍

用于设置上边框相关样式,该属性可按顺序设置border-top-widthborder-top-styleborder-top-color

取值

可按顺序设置如下属性:

标准化语法

<line-width> || <line-style> || <color>
where
<line-width> = <length> | thin | medium | thick
<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset
1
2
3
4

样例:

/* 上边框是粗双线红边框 */
border-top: thick double red;

/* 上边框是细点线蓝边框 */
border-top: thin dotted blue;

/* 上边框是10px虚线橙边框 */
border-top: 10px dashed orange;
1
2
3
4
5
6
7
8

与 Web 的区别

不支持 inherit、initial、revert、unset 等

Last Updated: 2022/7/15 下午7:22:06