网上说的路径问题我已经试了,但是就是显示不出来啊!本人小白,求大神指点啊!是图片的问题吗?
<!doctype html><!--DTD文档类型说明声明-->
<html>
<head>
<meta charset="utf-8"><!--字符编码的设置-->
<title>图片做背景</title>
<style type="text/css">
h1{
font-family:Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
background-color:red;
color:blue;
}
.div1{
background-color:image:url("file:///C|/Users/lenovo/Desktop/1.gif")
width: 500px;
height: 500px;
background-repeat: no-repeat;
background-position: center;
display: table;
}
</style>
</head>
<body>
<div class="div1"></div>
</body>
</html>