Desaprobado
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.
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
.
Warning: This property is deprecated. Use clip-path
instead.
Valor inicial | auto |
---|---|
Applies to | absolutely positioned elements |
Heredable | no |
Media | visual |
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 |
Canonical order | el orden único no-ambigüo definido por la gramática formal |
Sintaxis
Sintaxis formal: <shape> | autowhere
<shape> = 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 */
orect(<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
Especificación | Estado | Comentario |
---|---|---|
CSS Transitions La definición de 'clip' en esta especificación. |
Working Draft | Define clip como animatable. |
CSS Level 2 (Revision 1) La definición de 'clip' en esta especificación. |
Recommendation |
Compatibilidad entre exploradores
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Función | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Soporte básico | 1.0 | 1.0 (1.0) | 4.0 | 7.0 | 1.0 (85) |
8.0 En esta versión es soportada la sintaxis correcta con coma. |
Función | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Soporte básico | ? | ? | ? | ? | ? |
Ver también
- Propiedades CSS relacionadas:
text-overflow
,white-space
,overflow-x
,overflow-y
,overflow
,display
,position