CSS border-top-color نموذج
- پچاد border-top
- پریو border-top-left-radius
Definition and Usage
border-top-color sets the color of the top border of the element.
Only pure colors can be defined, and the border can only appear when the border style is a value that is not none or hidden.
تعلیمات:Always declare the border-style attribute before the border-color attribute. The element must obtain the border before you change its color.
See Also:
CSS Tutorial:CSS ਬੋਰਡਰ
CSS Reference Manual:border-top Attribute
HTML DOM Reference Manual:borderTopColor Attribute
Example
Set the color of the top border:
p { border-style:solid; border-top-color:#ff0000; }
CSS Grammar
border-top-color: color|transparent|initial|inherit;
Attribute Value
Attribute Value
Value | Description |
---|---|
color_name | It is specified that the border color is the color value of the color name (for example, red). |
hex_number | It is specified that the border color is the color value of the hexadecimal value (for example, #ff0000). |
rgb_number | It is specified that the border color is the color value of the rgb code (for example, rgb(255,0,0)). |
transparent | Default Value. The border color is transparent. |
inherit | It is specified that the border color should be inherited from the parent element. |
Technical Details
Default Value: | not specified |
---|---|
Inheritance: | no |
Version: | CSS1 |
JavaScript Grammar: | object.style.borderTopColor="blue" |
بیشتر مثال
- اُپر کی بوردر کی رنگ کا سٹیل بنا دیا جاتا ہے
- اس مثال میں اس کا اشارہ دیا گیا ہے کہ کیسے اُپر کی بوردر کی رنگ کا سٹیل بنا دیا جاتا ہے۔
براوزر کی پشتیبندی
جداول میں کچھ اعداد اس کا اشارہ دیتے ہیں کہ اس کا پہلا براوزر جس میں اس کا پورا مستند نہایت کیا گیا تھا کس نسلی کا تھا۔
ਚਰਮੋਨਾ | IE / ਐਂਜਲ | ਫਾਇਰਫਾਕਸ | ਸਫਾਰੀ | ਓਪਰਾ |
---|---|---|---|---|
1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
تعلیمات:Internet Explorer 6 (اور سار سار اور نسلی) نہایت 'transparent' کا رقمی مستند نہیں ہیں۔
تعلیمات:IE7 و اور سار سار اور نسلی کی براوزرز نہایت 'inherit' کا رقمی نہایت مستند نہیں ہیں۔IE8 کو !DOCTYPE کی ضرورت ہوتی ہے۔IE9 نے 'inherit' کا رقمی مستند کردیا ہے۔
- پچاد border-top
- پریو border-top-left-radius