स्टाइल बॉर्डरटॉपस्टाइल प्रॉपर्टी
उदाहरण
<div> तत्व में "ठोस" शीर्ष सीमा जोड़ें:
document.getElementById("myDiv").style.borderTopStyle = "solid";
परिभाषा और उपयोग
BorderTopStyle गुण किसी तत्व की शीर्ष सीमा की शैली को सेट या लौटाता है।
ब्राउज़र समर्थन
Property | |||||
---|---|---|---|---|---|
borderTopStyle | Yes | Yes | Yes | Yes | Yes |
वाक्य - विन्यास
बॉर्डरटॉप स्टाइल संपत्ति लौटाएं:
object.style.borderTopStyle
सीमा टॉप स्टाइल संपत्ति सेट करें:
object.style.borderTopStyle = value
|initial|inherit
सम्पत्ति की कीमत
Value | Description |
---|---|
none | Defines no border. This is default |
hidden | Same as "none", except in border conflict resolution for table elements |
dotted | Defines a dotted border |
dashed | Defines a dashed border |
solid | Defines a solid border |
double | Defines two borders. The width of the two borders are the same as the border-width value |
groove | Defines a 3D grooved border. The effect depends on the border-color value |
ridge | Defines a 3D ridged border. The effect depends on the border-color value |
inset | Defines a 3D inset border. The effect depends on the border-color value |
outset | Defines a 3D outset border. The effect depends on the border-color value |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
टेक्निकल डिटेल
डिफ़ॉल्ट मान: | कोई नहीं |
---|---|
प्रतिलाभ की मात्रा: | एक स्ट्रिंग, एक तत्व की शीर्ष सीमा की शैली का प्रतिनिधित्व करता है |
सीएसएस संस्करण | सीएसएस 1 |
और ज्यादा उदाहरण
उदाहरण
<div> तत्व की शीर्ष सीमा की शैली को "बिंदीदार" में बदलें:
document.getElementById("myDiv").style.borderTopStyle = "dotted";
उदाहरण
<div> तत्व की शीर्ष सीमा शैली लौटाएं:
alert(document.getElementById("myDiv").style.borderTopStyle);
उदाहरण
सभी विभिन्न मूल्यों का प्रदर्शन:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderTopStyle = listValue;
संबंधित पृष्ठ
सीएसएस ट्यूटोरियल: सीएसएस बॉर्डर
सीएसएस संदर्भ: सीमा-शीर्ष-शैली की संपत्ति
एचटीएमएल डोम संदर्भ: सीमा संपत्ति
❮ स्टाइल ऑब्जेक्ट