clip
Deprecated
Avoid using this feature in new projects.
The CSS Masking specification deprecated the clip property.
This feature may be a candidate for removal from web standards or browsers.>
Consider using the following features instead: clip-path.>
Resumen
La propiedad de CSS clip define qué porción de un elemento es visible. La propiedad clip se aplica solamente sobre elementos con position:absolute o position:fixed.
Advertencia:
This property is deprecated. Use clip-path instead.
| Valor inicial | auto |
|---|---|
| Applies to | absolutely positioned elements |
| Heredable | no |
| Valor calculado | auto if specified as auto, otherwise a rectangle with four values, each of which is auto if specified as auto or the computed length otherwise |
| Animation type | a rectangle |
Sintaxis
Sintaxis formal:clip =
<rect()> |
auto
<rect()> =
rect( <top> , <right> , <bottom> , <left> )
clip: rect(1px, 10em, 3rem, 2ch) clip: auto clip: inherit
Valores
<shape>-
Una forma rectangular del formulario
rect(<top>, <right>, <bottom>, <left>) /* sintaxis estándar */
o
rect(<top> <right> <bottom> <left>) /* sintaxis compatible inversa */
donde
<top>y<bottom>especifícan desplazamientos de la esquina del borde superior de la caja, y<right>, y<left>especifican desplazamientos de la esquina del borde izquiedo de la caja.<top>,<right>,<bottom>, y<left>pueden cada uno tenerun valor<length>oauto. auto-
El elemento no se recorta (valor por defecto)
Ejemplos
p {
border: dotted;
position: relative;
}
#img2 {
position: absolute;
left: 263px;
clip: rect(40px, 200px, 150px, 30px);
/* sintáxis estándar, no soportada por Internet Explorer 4-7 */
}
#img3 {
position: absolute;
left: 526px;
clip: rect(40px 200px 150px 30px);
/* sintáxis no-estándar, pero soportada por todos los exploradores importantes incluyendo Firefox y IE */
}

Especificaciones
| Specification |
|---|
| CSS Masking Module Level 1> # propdef-clip> |
Compatibilidad con navegadores
Ver también
- Propiedades CSS relacionadas:
text-overflow,white-space,overflow-x,overflow-y,overflow,display,position