The border-bottom shorthand CSS property sets an element's bottom border. It sets the values of border-bottom-width , border-bottom-style and border-bottom-color. The source for this interactive example is stored in a GitHub repository. As with all shorthand properties, border-bottom always sets the values of all of the properties that it can set, even if they are not specified. It sets those that are not specified to their default values. This means that
javascript - How to change border - bottom color through JS - Stack Overflow
By using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. It's impossible to manipulate the pseudo-selector :after directly through JavaScript , because it doesn't technically exist in the DOM. There are workarounds depending on specific use case, though unfortunately these workarounds only allow you to manipulate the content not the styling of pseudo-selectors.
The border-bottom-color CSS property sets the color of an element's bottom border. It can also be set with the shorthand CSS properties border-color or border-bottom. The source for this interactive example is stored in a GitHub repository. Get the latest and greatest from MDN delivered straight to your inbox.
The border-bottom property is a shorthand property for in the following order :. Default value: medium none color Inherited: no Animatable: yes, see individual properties. Property border-bottom 1.