Home >Web Front-end >CSS Tutorial >Detailed explanation of the border attribute of CSS style

Detailed explanation of the border attribute of CSS style

高洛峰
高洛峰Original
2017-03-15 10:42:372888browse

border usage details:

1, border-width AttributeSet the width of the border

Possible Value: Pixel

2, border-style Property sets the style of the border

Possible values: solid (straight line), dashed (dashed line), dotted (dotted line)

2, border-color Property sets the border color

Possible values: red,#f00,#ff0000,rgb(255,0,0),transparent

border-left Property setting left border

border-right Property setting right border

border-top Attribute setting top border

border-bottom Attribute setting bottom border

Extension extension

html code

e388a4556c0f65e1904146cc1a846bee94b3e26ee717c64999d7867364b1b4a3

css code

 p {
    height: 20px;
    width: 20px;
    border-color: #FF9600 #3366ff #12ad2a #f0ed7a;
    border-style: solid;
    border-width: 20px;
}

result

css code

 p {    
    width: 0px;
    height: 0px;
    border-color: #FF9600 #3366ff #12ad2a #f0ed7a;
    border-style: solid;
    border-width: 20px;
}

result

css code

 p {    
    width: 0px;
    height: 0px;
    border-color: lightblue transparent trnasparent transparent;
    border-style: solid;
    border-width: 20px;
}

result

css code

 p {    
    width: 0px;
    height: 0px;
    border-color: transparent trnasparent pink;
    border-style: solid;
    border-width: 20px;
}

result

css Code

 p {    
    width: 0px;
    height: 0px;
    border-color: transparent gray trnasparent transparent;
    border-style: solid;
    border-width: 20px;
}

Result

css code

 p {    
    width: 0px;
    height: 0px;
    border-color: transparent transparent trnasparent lightgreen;
    border-style: solid;
    border-width: 20px;
}

Result

The above is the detailed content of Detailed explanation of the border attribute of CSS style. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn