aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/css/border-left-color/index.html
blob: 7bad3a8569dbfbb99b0ff9e2e5ff611b3366589b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
title: border-left-color
slug: Web/CSS/border-left-color
translation_of: Web/CSS/border-left-color
---
<div>{{CSSRef}}</div>

<p><span class="seoSummary">The <strong><code>border-left-color</code></strong> CSS property sets the color of an element's left <a href="/en-US/docs/Web/CSS/border">border</a>.</span> It can also be set with the shorthand CSS properties {{cssxref("border-color")}} or {{cssxref("border-left")}}.</p>

<div>{{EmbedInteractiveExample("pages/css/border-left-color.html")}}</div>



<h2 id="Syntax">Syntax</h2>

<pre class="brush: css no-line-numbers  language-css">/* &lt;color&gt; values */
border-left-color: red;
border-left-color: #ffbb00;
border-left-color: rgb(255, 0, 0);
border-left-color: hsla(100%, 50%, 25%, 0.75);
border-left-color: currentcolor;
border-left-color: transparent;

/* Global values */
border-left-color: inherit;
border-left-color: initial;
border-left-color: unset;
</pre>

<p>The <code>border-left-color</code> property is specified as a single value.</p>

<h3 id="Values">Values</h3>

<dl>
 <dt>{{cssxref("&lt;color&gt;")}}</dt>
 <dd>The color of the left border.</dd>
</dl>

<h3 id="Formal_syntax">Formal syntax</h3>

{{csssyntax}}

<h2 id="Examples">Examples</h2>

<h3 id="A_simple_div_with_a_border">A simple div with a border</h3>

<h4 id="HTML">HTML</h4>

<pre class="brush: html">&lt;div class="mybox"&gt;
  &lt;p&gt;This is a box with a border around it.
     Note which side of the box is
     &lt;span class="redtext"&gt;red&lt;/span&gt;.&lt;/p&gt;
&lt;/div&gt;</pre>

<h4 id="CSS">CSS</h4>

<pre class="brush: css">.mybox {
    border: solid 0.3em gold;
    border-left-color: red;
    width: auto;
}

.redtext {
    color: red;
}</pre>

<h4 id="Result">Result</h4>

<p>{{EmbedLiveSample('A_simple_div_with_a_border')}}</p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS3 Backgrounds', '#propdef-border-left-color', 'border-left-color')}}</td>
   <td>{{Spec2('CSS3 Backgrounds')}}</td>
   <td>No significant changes, though the <code>transparent</code> keyword, now included in {{cssxref("&lt;color&gt;")}} which has been extended, has been formally removed.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS2.1', 'box.html#propdef-border-left-color', 'border-left-color')}}</td>
   <td>{{Spec2('CSS2.1')}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<p>{{cssinfo}}</p>

<h2 id="Browser_compatibility">Compatibilidade com navegadores</h2>



<p>{{Compat("css.properties.border-left-color")}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>The border-related CSS shorthand properties: {{Cssxref("border")}}, {{Cssxref("border-left")}}, and {{Cssxref("border-color")}}.</li>
 <li>The color-related CSS properties for the other borders: {{Cssxref("border-right-color")}}, {{Cssxref("border-bottom-color")}}, and {{Cssxref("border-top-color")}}.</li>
 <li>The other border-related CSS properties applying to the same border: {{cssxref("border-left-style")}} and {{cssxref("border-left-width")}}.</li>
</ul>