CSS中使用哪个属性来控制背景图像的重复?
要控制背景中图像的重复,请使用background-repeat属性。如果您不想重复图像,则可以将no-repeat值用于background-repeat属性,在这种情况下,图像将仅显示一次。
示例
您可以尝试运行以下代码,以了解如何使用background-repeat属性:
<html>
<head>
<style>
body {
background-image: url("/css/images/css.jpg");
background-repeat: repeat;
}
</style>
</head>
<body>
<p>nhooo.com</p>
</body>
</html>