The The Values
The color of the top border. Formal definitionFormal syntaxborder-top-color = ExamplesA simple div with a borderHTML
CSS
ResultSpecifications
Browser compatibilityBCD tables only load in the browser See also
ExampleSet a color for the left border: div {border-left-color: coral;} Try it Yourself » More "Try it Yourself" examples below. Definition and UsageThe Note: Always declare the
border-style or the border-left-style property before the Show demo ❯
Browser SupportThe numbers in the table specify the first browser version that fully supports the property.
CSS Syntaxborder-left-color: color|transparent|initial|inherit; Property Values
More ExamplesExampleSet a color for the left border with a HEX value: div {border-left-color: #92a8d1;} Try it Yourself » ExampleSet a color for the left border with an RGB value: div {border-left-color: rgb(201, 76, 76);} Try it Yourself » ExampleSet a color for the left border with an RGBA value: div {border-left-color: rgba(201, 76, 76, 0.3);} Try it Yourself » ExampleSet a color for the left border with a HSL value: div {border-left-color: hsl(89, 43%, 51%);} Try it Yourself » ExampleSet a color for the left border with a HSLA value: div {border-left-color: hsla(89, 43%, 51%, 0.3);} Try it Yourself » ExampleSet a transparent left border: div {border-left-color: transparent;} Try it Yourself » Related PagesCSS tutorial: CSS Border CSS reference: border-left property HTML DOM reference: borderLeftColor property How do you blur a border in CSS?Blurred Border
If you want to visually blur the border of an element, use a pseudo-element, put it behind the parent element with z-index , apply a transparent border, add the background-clip , filter , and clip-path properties.
How do you color a half border in CSS?Use two gradients: one rotated 90deg and the other rotated -90deg. Use two color stops: #880015 at 50% and #fff at 50% Use a background-size of 100% width and 3px in height, i.e. background-size: 100% 3px. Position the two backgrounds at the top left and bottom left of your element.
How do I create a border gradient in CSS?To show gradients for a border with CSS you can use the border-image property. It allows setting gradient values in the same way as the background-image property. Besides the border-image property, you should specify additional properties to actually show border gradient.
How do I fade the border of an image in CSS?Blurring the edges of a photo in CSS is pretty straightforward, with one gotcha. To blur a photo we need to use box-shadow in a way where the shadow "eats" the image. For this effect to work, the blur must be the same color as the surrounding background, and inset must be used.
|