The border-top-color property sets the color of the top border side. Level 4 also accepts <image-1D> (e.g. a gradient along the edge)..box {
border-top-color: navy;
}.box {
border-top: 4px solid oklch(0.7 0.15 240);
}currentColorUses the element's current color value (default).transparentFully transparent color.rgb()RGB color function.hsl()HSL color function.hwb()HWB color function.lab()CIE Lab color function.lch()CIE LCH color function.oklab()Oklab color function.oklch()Oklch color function.color()Generic color function for custom color spaces.light-dark()Selects between two color values per color-scheme.linear-gradient()Linear color gradient (as <image-1D>, new in L4).CSS Borders Module Level 4Working Draft<color>W3CMDNCSSShow all codeEdit CSS onlineThe plugin that remembers hundreds of CSS items for youEvery CSS property — in a live demonstrationThe bilingual CSS referencedefinitionexamplessyntaxmodulespecificationvalue typessourcesvisual demonstrationpreviousnext