Attribut Style backgroundClip

Définition et utilisation

backgroundClip Définir ou retourner la zone de dessin du fond de l'attribut.

Veuillez également consulter :

HTML Style :Attribut background

Tutoriel CSS3 :Arrière-plan CSS

Tutoriel CSS3 :CSS3 Fond

Manuel CSS :L'attribut background-clip

Exemple

Spécifier la zone de dessin du fond :

document.getElementById("myDIV").style.backgroundClip = "content-box";

Essayer par vous-même

Syntaxe

Retourner l'attribut backgroundClip :

object.style.backgroundClip

Définir l'attribut backgroundClip :

object.style.backgroundClip = "border-box|padding-box|content-box|initial|inherit"

Valeur de l'attribut

Valeur Description
border-box Valeur par défaut. Le fond est découpé à la boîte bord (border box).
padding-box Le fond est découpé à la boîte marge interne.
content-box Le fond est découpé au contenu du boîte.
initial Set this property to its default value. See also initial.
inherit Inherits this property from its parent element. See also inherit.

Détails techniques

Valeur par défaut : border-box
Valeur de retour : Une chaîne de caractères, représentant l'élement L'attribut background-clip.
Version CSS : CSS3

Support du navigateur

backgroundClip C'est une caractéristique CSS3 (1999).

Tous les navigateurs le supportent complètement :

Chrome Edge Firefox Safari Opera IE
Chrome Edge Firefox Safari Opera IE
Pris en charge Pris en charge Pris en charge Pris en charge Pris en charge 11