English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
CSS background-The origin attribute specifies the positioning area of the background, that is, usingbackground-imageThe position of the image origin specified by the attribute.
The following table summarizes the usage context and version history of this attribute.
Default value: | padding-box |
---|---|
Applicable to: | All elements. It is also applicable to::first-letterand::first-line。 |
Inheritance: | None |
Animation making possible: | 否。请参见 Non.。 |
Voir également | CSS3Attributs d'animation |
Version : | nouvelle fonction JavaScript Syntaxe:-object |
box"
background-Syntaxe d'utilisation de origin-La syntaxe de cet attribut est la suivante :-box | padding-box | content
box | initial | inherit-Les exemples suivants montrent comment utiliser background
Exemple .box { 25height: width: 15height: 0px; 10padding: px; 6border:333px dashed # ;/background: url("images-sky.jpg") no background-repeat; background-size: contain;-origin: content box;}/Vérifiez ici‹
›Note :-Si l'attribut valeur est ignorébackground-attachmentL'attribut est spécifié comme fixed.
Le tableau suivant décrit les valeurs de cet attribut.
Valeur | Description |
---|---|
border-box | Spécifie que le fond s'étend à l'extérieur des bords. Le fond est dessiné sous la bordure. |
padding-box | Spécifie que le fond s'étend à l'extérieur des bords du remplissage. Le fond n'est pas dessiné sous la bordure. C'est la valeur par défaut. |
content-box | Spécifie que le fond est dessiné uniquement à l'intérieur de la boîte de contenu (coulée). Le fond n'est pas dessiné sous la bordure et la zone de remplissage. |
initial | Réinitialisez cette propriété à sa valeur par défaut. |
inherit | Si spécifié, l'élément lié utilise le background de son élément parent-Valeur calculée de l'attribut origin. |
background-Compatibilité du navigateur pour l'attribut origin, tous les navigateurs populaires prennent en charge cet attribut.
|
Veuillez consulter les tutoriels suivants :CSS3Arrière-plan,CSS3Arrière-plan。
Attributs associés :background,background-attachment,background-color,background-image,background-clip,background-position,background-repeat,background-size。