Comment spécifier une image d'arrière-plan fixe

Exemple d'analyse :

L'attribut background-attachment peut définir si l'image d'arrière-plan est fixe ou défile avec le reste de la page.

Lorsque la valeur de l'attribut background-attachment est "fixed", l'image d'arrière-plan est fixe et ne défile pas avec le reste de la page.


Formation continue
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> body { background-image:url('https://img.php.cn/upload/article/000/000/024/5c6a4428ea867709.png'); background-repeat:no-repeat; background-attachment:fixed; } </style> </head> <body> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> <p>背景图片是固定的,不会随页面的其余部分滚动。</p> </body> </html>
soumettreRéinitialiser le code
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!