如何在水平方向重复背景图像 登录

如何在水平方向重复背景图像

实例解析:

background-repeat属性用于设置背景图像的平铺方式。可以设置以下值:

 ● repeat:默认值,背景图像将向垂直和水平方向重复。

 ● repeat-x:只有水平位置会重复背景图像。

 ● repeat-y:只有垂直位置会重复背景图像。

 ● no-repeat:设置背景图片不重复。




下一节
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网(php.cn)</title> <style> body { background-image:url('https://img.php.cn/upload/article/000/000/015/5c6a80bba060c467.png'); background-repeat:repeat-x; } </style> </head> <body> <h1>Hello World!</h1> </body> </html>
提交 重置代码
章节 评论 笔记 课件
  • 取消 回复 发送
  • 取消 发布笔记 发送