html写好了div背景图片不显示?这是为什么
html代码:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/...
html代码:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>绿人OLED照明</title>
<link href="css/style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="header">
<div class="she11">
<div id="she12">
</div>
</div>
</div>
<div id="heading">
</div>
<div id="zhongjian">
</div>
<div id="zhuyao">
</div>
<div id="footer">
</div>
</body>
</html>
css代码:
*{
margin:0 anto;
outline:0px line;
padding:0;
}
body{
font-family:"宋体";
font-size:13px;
line-height:21px;
text-align:left;
}
.lianjie{
text-decoration:none;
color:#00CC66;
font-size:13px;
}
#header{
margin: 0px auto;
background: url(../image/header_bk.gif) repeat-x scroll 0px 0px;
height:103px;
padding:0;
outline:0px line;
}
.she11{
width:946px;
margin: 0 auto;
}
#she12{
display:block;
float:left;
background: url(../image/LOGO.png) no-repeat scroll 50px 90px;
height:50px;
width:90px;
}
#heading{
background:#ffffff url(../image/heading-bg.gif) scroll center 1px;
padding:15px 0px;
margin:0px;
outline:0px none;
}
#zhongjian{
background: rgba(0, 0, 0, 0) url(../image/zhongjian .gif);
height:127px;
padding-top:5px;
}
#zhuyao{
background:#e9e9e9 none repeat scroll 0 0;
padding:0px 37px 28px 15px;
}
#footer{
background:#e9e9e9 url(../image/footer.gif) repeat-x scroll 0 0;
padding-bottom:50px;
padding-top:15px;
}
请问为什么logo图片不显示啊?
图片路径我填写正确了啊 展开
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>绿人OLED照明</title>
<link href="css/style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="header">
<div class="she11">
<div id="she12">
</div>
</div>
</div>
<div id="heading">
</div>
<div id="zhongjian">
</div>
<div id="zhuyao">
</div>
<div id="footer">
</div>
</body>
</html>
css代码:
*{
margin:0 anto;
outline:0px line;
padding:0;
}
body{
font-family:"宋体";
font-size:13px;
line-height:21px;
text-align:left;
}
.lianjie{
text-decoration:none;
color:#00CC66;
font-size:13px;
}
#header{
margin: 0px auto;
background: url(../image/header_bk.gif) repeat-x scroll 0px 0px;
height:103px;
padding:0;
outline:0px line;
}
.she11{
width:946px;
margin: 0 auto;
}
#she12{
display:block;
float:left;
background: url(../image/LOGO.png) no-repeat scroll 50px 90px;
height:50px;
width:90px;
}
#heading{
background:#ffffff url(../image/heading-bg.gif) scroll center 1px;
padding:15px 0px;
margin:0px;
outline:0px none;
}
#zhongjian{
background: rgba(0, 0, 0, 0) url(../image/zhongjian .gif);
height:127px;
padding-top:5px;
}
#zhuyao{
background:#e9e9e9 none repeat scroll 0 0;
padding:0px 37px 28px 15px;
}
#footer{
background:#e9e9e9 url(../image/footer.gif) repeat-x scroll 0 0;
padding-bottom:50px;
padding-top:15px;
}
请问为什么logo图片不显示啊?
图片路径我填写正确了啊 展开
展开全部
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
<html xmlns="
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>绿人OLED照明</title>
<style>
*{margin:0 anto;outline:0px line;padding:0;}
body{font-family:"宋体";font-size:13px;line-height:21px;text-align:left;}
#header{
margin: 0px auto;
background-color:black;
height:103px;
padding:0;
outline:0px line;
}
.she11{
width:946px;
height:110px;
margin: 0 auto;
}
#she12{
display:block;
float:left;
background: url(1.jpg) no-repeat;
height:110px;
width:110px;
}
</style>
</head>
<body>
<div id="header">
<div class="she11">
<div id="she12">
</div>
</div>
</div>
</body>
</html>
修改后的代码,logo图片是110px的,去除了默认属性scroll,50px 90px不是图片的大小意思,是距离顶部50px和左边90px,左外边距和上外边距
效果
展开全部
如果你是作为背景图片的话 盒子的宽高都的有 我发现有很多你没有设置 还有你用url(../image/LOGO.png) no-repeat scroll 50px 90px;后面的50px 90px你要确定这个剪切了 有图片 如果太小了 这样就不能显示 用这个图片要够大才行
更多追问追答
追问
还有什么没设置啊
追答
就是宽高啊 设置了应该是能出来的 我说你有很多div都没有设置宽高
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询