CSS Border-color Properties using _css Tutorial _css_ Web page Authoring

Source: Internet
Author: User
Tags border color
Border-color--Define color values for four borders: [<color> | Transparent]{1,4} | Inherit <color>{1,4}: Color notation transparent{1,4}: Transparent inherit: Inherit initial value: Default value inheritance for the same color property: No for: All elements border: border, color: colors. Border-coloborder-color--Defines the color of four borders
Value: [<color> | Transparent]{1,4} | Inherit
<color>{1,4}: Color notation
transparent{1,4}: Transparent
Inherit: Inheritance
Initial value: The default value of the same color property
Inheritance: No
Applies to: all elements
border: borders, Color: colors.
The Border-color and Border-width are assigned the same way, and can be assigned either three or 4 color values respectively.

Border-color:red black Blue Green;
If you define four values, then the four values are up, right, bottom, and left (starting with the top border and traversing in a clockwise order). Define the dream capital the top frame of the paragraph is red, the right border is black, the bottom border is blue, and the left border is green.

Border-color:red black Blue;
If you define only three values, the middle value represents the left and right borders. Define the dream capital the top border of the paragraph is red, the bottom border is blue, the left border is black.

Border-color:red Black;
If you define only two values, the preceding values represent the upper and lower borders, and the values that follow represent the left and right borders. Define the top of the Dream section, the bottom border is red, the left border is black.

If you define only one value, this value represents four edges. Define the dream capital the border of the paragraph is red.

Script House Tip: When the border color border-color is not set, the color of the border uses the value of this element's Color property.

In the above example, the value of color is red because no value is set for Border-color.

CSS Border-color Property Example-uses color values for colors.

Script House Tip: Because CSS properties have overridden properties, the order of the settings is important.

Border:medium solid Green;
In the example above, the color of the bottom border is red and the other borders are green. Because Border-bottom does not have a color set, you should take the color that you specify.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.