Tarihin Style borderStyle
- 上一页 borderSpacing
- 下一页 borderTop
- 返回上一层 Objects HTML DOM Style
Tasirin da kuma amfani
borderStyle
Tarihin wannan shafi yana haɗa da rarraba da kuma cewa abin da ke cikin abin hanyar yana kaiwa tsaɗan.
Tarihin wannan shafi yana da kada ayyuka daga daya zuwa bakwai:
- Alkalumma daga bakwai, misali: p {border-style: solid} - Tsaɗan duniyar bakwai ce tatsuni
- Alkalumma daga bakwai, misali: p {border-style: solid dotted} - Tsaɗan baya da tsaki ce tatsuni, tsaɗan na dama da yamma ce kofar kofar
- Alkalumma daga bakwai, misali: p {border-style: solid dotted double} - Tsaɗan baya ce tatsuni, tsaɗan na dama da yamma ce kofar mai nokki, tsaɗan na tsaki ce kofar mai guda
- Alkalumma daga bakwai, misali: p {border-style: solid dotted double dashed} - Tsaɗan baya ce tatsuni, tsaɗan na dama ce kofar, tsaɗan na tsaki ce kofar mai guda, tsaɗan na yamma ce kofar
Kwararrin kusa:
Tasirin CSS:CSS ɗanar
Kwararrin CSS Kira:属性 border-style
HTML DOM Kwararrin Kira:border 属性
border attribute
Instance
Example 1
Adds a solid border to the <div> element:
document.getElementById("myDiv").style.borderStyle = listValue;
document.getElementById("myDiv").style.borderStyle = "solid";
Example 2
Changes the style of the four borders of the <div> element:
document.getElementById("myDiv").style.borderStyle = listValue;
document.getElementById("myDiv").style.borderStyle = "dotted solid double dashed";
Example 3
Returns the border style of the <div> element:
document.getElementById("myDiv").style.borderStyle = listValue;
alert(document.getElementById("myDiv").style.borderStyle);
Example 4
All different values demonstration: var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderStyle = listValue;
Try it yourself
Syntax
Sets the borderStyle property:Returns the borderStyle property:
.style.borderStyle
Sets the borderStyle property:object .style.borderStyle =
value | Value |
---|---|
Description | none |
Defines a border without border. Default. | hidden |
Same as "none", except when resolving border conflicts in table elements. | dotted |
Defines a dotted border. | dashed |
Defines a dashed border. | solid |
Defines a solid border. | double |
Defines two borders. The width of both borders is the same as the value of border-width. | groove Defines a 3D inset border. The effect depends on border-color |
Defines a 3D grooved border. The effect depends on | ridge Defines a 3D inset border. The effect depends on border-color |
Defines a 3D ridged border. The effect depends on | inset Defines a 3D inset border. The effect depends on border-color |
The value of | Defines a 3D outset border. The effect depends on the value of border-color. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | None |
---|---|
Return value: | A string that represents the style of the element's border. |
CSS version: | CSS1 |
browser supports
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
支持 | 支持 | 支持 | 支持 | 支持 |
- 上一页 borderSpacing
- 下一页 borderTop
- 返回上一层 Objects HTML DOM Style