CSS ระบุ border-right-color

Definition and Usage

border-right-color sets the color of the right border of the element.

Only pure colors can be defined, and the border can only appear when the border style is a value other than none or hidden.

หมายเหตุ:Always declare the border-style property before the border-color property. The element must have a border before you change its color.

See also:

CSS Tutorial:CSS ขอบ

CSS Reference Manual:border-right Property

HTML DOM Reference Manual:borderRightColor Property

Example

Set the border-right color:

p
  {
  border-style:solid;
  border-right-color:#ff0000;
  }

Try it yourself

CSS Syntax

border-right-color: color|transparent|initial|inherit;

Property Value

Value Description
color_name Specifies the border color as a color name (e.g., red).
hex_number Specifies the border color as a hexadecimal value (e.g., #ff0000).
rgb_number Specifies the border color as an rgb code (e.g., rgb(255,0,0)).
transparent Default Value. The border color is transparent.
inherit Specifies that the border color should be inherited from the parent element.

Technical Details

Default Value: not specified
Inheritance: no
Version: CSS1
JavaScript Syntax: object.style.borderRightColor="blue"

ตัวอย่างเพิ่มเติม

ตั้งสีขอบขวาของเลขาธิการ
ตัวอย่างนี้แสดงวิธีการตั้งสีของขอบขวาของเลขาธิการ。

การสนับสนุนเบราเซอร์

ตัวเลขในตารางบอกว่าเวอร์ชั่นเบราเซอร์แรกที่สนับสนุนคุณสมบัตินี้อย่างเต็มที่。

Chrome IE / Edge Firefox Safari Opera
1.0 4.0 1.0 1.0 3.5

หมายเหตุ:Internet Explorer 6 (และเวอร์ชั่นที่เก่ากว่า) ไม่สนับสนุนค่า "transparent" ของคุณสมบัติ。

หมายเหตุ:IE7 และเวอร์ชั่นเบราเซอร์ที่เก่ากว่าไม่สนับสนุนค่า "inherit"。IE8 ต้องการ !DOCTYPE。IE9 สนับสนุน "inherit"。