仅用 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>
广告
数据结构
网络
关系型数据库管理系统
操作系统
Java
iOS
HTML
CSS
安卓
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP