- 2/5
- 1
- 2
- 3
- 4
- 5
织梦DedeCMS视频教程买空间 租服务器 选网硕互联! 无忧站长工具,百度权重一键全查!
CSS控制背景垂直平铺成一列,实际上我们只用改变background-repeat: 为repeat-y ,也就是沿Y方向重复,如果要水平平铺的话,相信聪明的你应该知道怎么做了,那就是把background-repeat: 值改为repeat-x,这样就搞定了。
<html> <head> <title>背景图片横向重复</title> <style type="text/css"> body { background-image: url('/jscss/demoimg/bgdemo3.jpg'); background-repeat: repeat-x } </style> </head> <body> CSS让背景水平平铺成一列,我们只需定义background-repeat: 为repeat-y ,就OK了。 </body> </html>