
La propiedad border-top-color CSS establece el color del marco superior del elemento. Tenga en cuenta que en la mayoría de los casos es preferible utilizar propiedades CSS cortas como border-color o border-top.
Funciones border-top-color css
| Valor inicial | currentcolor |
|---|---|
| Aplicado a | Todos los artículos. |
| Heredable | No |
| Móvil | Sí |
| Valor calculado | Color dado. |
/* <color> valores */ 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;
Ejemplos y aplicaciones en código
En el siguiente ejemplo, estableceremos un marco superior para los elementos que son azul <div>( border-top-color), su ancho ( border-top-width) es igual 5pxy su forma ( border-top-style) tiene puntos.
Código HTML:
< div > Este elemento tiene un marco en su borde superior </ div >
Código CSS:
div {
border-top-style: dotted;
border-top-width: 5px;
border-top-color: blue;
padding: 0.5em;
}Soporte de navegadores
| Característica | Chrome | Firefox | IE | Ópera | Safari |
|---|---|---|---|---|---|
| Soporte básico | 1.0 | 1.0 | 4 | 3,5 | 1.0 |
Características generales
La propiedad border-top-color acepta un valor.
<color>
Color del marco inferior.
Estructura border-top-color css
border-top-color: <color>;
Consulte también
- La página de propiedades establecida por la propiedad de acceso directo
border-top:border-top-widthyborder-top-style. - La página de propiedades establecido por la propiedad de acceso directo
border:border-width,border-style, yborder-color. - Configure una imagen para el marco usando la función
border-image. - Esquinas redondeadas y
border-radiusesquinas superiores (border-top-left-radius border-top-right-radius) - La propiedad
colorque establece el color del elemento y el valor del color<color>.
- Introducción al Lenguaje de Programación CSS
- Características text-decoration-style en CSS
- Características text-decoration-line en CSS
- Características text-decoration-color en CSS
- Características text-decoration en CSS
- Características text-align-last en CSS
- Características text-align en CSS
- Características tab-size en CSS
- Características overflow-wrap en CSS
- Características line-break en CSS
- Características letter-spacing en CSS
- Características direction en CSS
- Características line-height en CSS
- Características font-style en CSS
- Características font-weight en CSS
- Características font-stretch en CSS
- Características font en CSS
- Características font-size-adjust en CSS
- Características font-size en CSS
- Características font-kerning en CSS
- Características font-family en CSS
- Características order en CSS
- Características justify-content en CSS
- Características flex-wrap en CSS
- Características flex-shrink en CSS
- Características flex-grow en CSS
- Características flex-flow en CSS
- Características flex-direction en CSS
- Características flex-basis en CSS
- Características flex en CSS
- Características align-self en CSS
- Características align-items en CSS
- Características align-content en CSS
- Características overflow-y en CSS
- Características overflow-x en CSS
- Características overflow en CSS
- Características padding-right en CSS
- Características padding-left en CSS
- Características padding-bottom en CSS
- Características margin-top en CSS
- Características padding-top en CSS
- Características margin-right en CSS









































