CSS - border-color
border-color
Sets the color of the four borders
Property Variable Name
border-color
Available Values for border-color
#F00|transparent|initial|inherit
Examples Using border-color values
Example using border-color #F00
Example using border-color #F00
Here is an example using border-color:#F00;
Code
<style>
/* Some Styles so we can see the element */
.rainbow {
background:linear-gradient(45deg, #dc3b3e, #3b99dc 50%, #3bdc90 75%, rgb(255 141 0) 100%);
}
.demo-box-1 {
background:#999;
margin-bottom:10px;
height:220px;
width:100%;
display: flex;
flex-wrap: wrap;
color:#FFF;
align-items: center;
justify-content: center;
border:5px solid #000;
}
.demo-box-1 {
/* this is the test property */
border-color:#F00;
}
</style>
<h2>Example using border-color #F00</h2>
<p>Here is an example using <code>border-color:#F00;</code></p>
<div class='rainbow demo-box-1'>
</div>
Example using border-color transparent
Example using border-color transparent
Here is an example using border-color:transparent;
Code
<style>
/* Some Styles so we can see the element */
.rainbow {
background:linear-gradient(45deg, #dc3b3e, #3b99dc 50%, #3bdc90 75%, rgb(255 141 0) 100%);
}
.demo-box-2 {
background:#999;
margin-bottom:10px;
height:220px;
width:100%;
display: flex;
flex-wrap: wrap;
color:#FFF;
align-items: center;
justify-content: center;
border:5px solid #000;
}
.demo-box-2 {
/* this is the test property */
border-color:transparent;
}
</style>
<h2>Example using border-color transparent</h2>
<p>Here is an example using <code>border-color:transparent;</code></p>
<div class='rainbow demo-box-2'>
</div>
Example using border-color initial
Example using border-color initial
Here is an example using border-color:initial;
Code
<style>
/* Some Styles so we can see the element */
.rainbow {
background:linear-gradient(45deg, #dc3b3e, #3b99dc 50%, #3bdc90 75%, rgb(255 141 0) 100%);
}
.demo-box-3 {
background:#999;
margin-bottom:10px;
height:220px;
width:100%;
display: flex;
flex-wrap: wrap;
color:#FFF;
align-items: center;
justify-content: center;
border:5px solid #000;
}
.demo-box-3 {
/* this is the test property */
border-color:initial;
}
</style>
<h2>Example using border-color initial</h2>
<p>Here is an example using <code>border-color:initial;</code></p>
<div class='rainbow demo-box-3'>
</div>
Example using border-color inherit
Example using border-color inherit
Here is an example using border-color:inherit;
Code
<style>
/* Some Styles so we can see the element */
.rainbow {
background:linear-gradient(45deg, #dc3b3e, #3b99dc 50%, #3bdc90 75%, rgb(255 141 0) 100%);
}
.demo-box-4 {
background:#999;
margin-bottom:10px;
height:220px;
width:100%;
display: flex;
flex-wrap: wrap;
color:#FFF;
align-items: center;
justify-content: center;
border:5px solid #000;
}
.demo-box-4 {
/* this is the test property */
border-color:inherit;
}
</style>
<h2>Example using border-color inherit</h2>
<p>Here is an example using <code>border-color:inherit;</code></p>
<div class='rainbow demo-box-4'>
</div>