仅用 CSS 显示背景图片一次
使用 background-repeat 属性仅显示背景图片一次。你可以尝试运行以下代码来实现background-repeat 属性 −
示例
<!DOCTYPE html> <html> <head> <style> body { background-image: url("https://tutorialspoint.com/videotutorials/images/tutor_connect_home.jpg"); background-repeat: no-repeat; } </style> </head> <body> <h1>Background Image</h1> </body> </html>
广告