添加背景图片有四种常用的方式,分别是:
repeat 完全平铺
repeat-x 横向平铺
repeat-y 纵向平铺
no-repeat 不平铺
使用示例:
DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Documenttitle><style>.box{width: 600px;height: 600px;border: 1px solid red;background: url("./images/QQon5.gif") no-repeat; //在这里可以进行更改}style>
head>
<body><div class="box">div>
body>
html>
转载于:https://www.cnblogs.com/chichung/p/9691062.html