aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/css/border-top-color/index.html
blob: 78e8406f3cb7478e1a3bd54ab52830efaf4cff39 (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
---
title: border-top-color
slug: Web/CSS/border-top-color
translation_of: Web/CSS/border-top-color
---
<div>{{CSSRef}}</div>

<p>La  propiedad CSS <strong><code>border-top-color</code></strong>  establece el color superior de un elemento {{cssxref("border")}}. Tenga en cuenta que en la mayoria de los casos las propiedades abreviadas {{cssxref("border-color")}}{{cssxref("border-top")}} son mas convenientes y preferidas.</p>

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

/* Valores globales */
border-top-color: inherit;
border-top-color: initial;
border-top-color: unset;
</pre>

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

<h2 id="Sintaxis">Sintaxis</h2>

<p>La propiedad <code>border-top-color</code> es especificada con un valor unico.</p>

<h3 id="Valores">Valores</h3>

<dl>
 <dt>{{cssxref("&lt;color&gt;")}}</dt>
 <dd>El color superior del borde</dd>
</dl>

<h3 id="Sintaxis_Formal">Sintaxis Formal</h3>

{{csssyntax}}

<h2 id="Ejemplos">Ejemplos</h2>

<h3 id="Un_div_simple_con_un_borde">Un div simple con un borde</h3>

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

<pre class="brush: html">&lt;div class="mybox"&gt;
  &lt;p&gt;Esta es una caja con un border alrededor.
     Tenga en cuenta que un border de la caja es
     &lt;span class="redtext"&gt;Rojo&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-top-color: red;
  width: auto;
}

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

<h4 id="Resultado">Resultado</h4>

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

<h2 id="Especificaciones">Especificaciones</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Especificación</th>
   <th scope="col">Estado</th>
   <th scope="col">Comentarios</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS3 Backgrounds', '#border-top-color', 'border-top-color')}}</td>
   <td>{{Spec2('CSS3 Backgrounds')}}</td>
   <td>Sin cambios significativos, aunque la palabra clave <code>transparent</code> , ahora incluida en {{cssxref("&lt;color&gt;")}} que se ha extendido, se ha eliminado formalmente.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS2.1', 'box.html#border-color-properties', 'border-top-color')}}</td>
   <td>{{Spec2('CSS2.1')}}</td>
   <td>Definición inicial</td>
  </tr>
 </tbody>
</table>

<h2 id="Compatibilidad_entre_navegadores">Compatibilidad entre navegadores</h2>



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

<h2 id="Ver_tambien">Ver tambien</h2>

<ul>
 <li>Las propiedades abreviadas de CSS relacionadas con los bordes : {{Cssxref("border")}}, {{Cssxref("border-top")}}, y {{Cssxref("border-color")}}.</li>
 <li>Las propiedades abrevadas de CSS relacionadas con el color para los bordes: {{Cssxref("border-right-color")}}, {{Cssxref("border-bottom-color")}}, y {{Cssxref("border-left-color")}}.</li>
 <li>Las otras propiedades CSS relaciones con los bordes que se aplican al mismo borde : {{cssxref("border-top-style")}} y {{cssxref("border-top-width")}}.</li>
</ul>