请教大神,在div+css布局,为什么设置了背景图片用浏览器显示不出来?
<styletype="text/css">#father{width:800px;height:auto;padding:5px;margin-right:auto;m...
<style type="text/css">
#father {
width: 800px;
height: auto;
padding: 5px;
margin-right: auto;
margin-left: auto;
}
#father .son1 {
height: 340px;
background-image: url(/%E7%B4%A0%E6%9D%90/1%20(3)%E5%89%AF%E6%9C%AC.jpg);
}
#father .son2 {
height: 40px;
font-family: "新宋体";
font-size: 24px;
font-weight: bold;
}
#father .son3 {
height: 700px;
float: left;
width: 400px;
}
#father .son4 {
height: 700px;
width: 400px;
float: right;
}
#father .son5 {
height: 100px;
clear: right;
}
</style>
</head>
<body>
<div id="father">
<div class="son1"><img src="/素材/initpintu_副本.jpg" width="800" height="340" /></div>
<div class="son2">首页 作品介绍 作品观赏</div>
<div class="son3">son3 </div>
<div class="son4">son4 </div>
<div class="son5">son5 </div>
非常感谢 非常感谢 展开
#father {
width: 800px;
height: auto;
padding: 5px;
margin-right: auto;
margin-left: auto;
}
#father .son1 {
height: 340px;
background-image: url(/%E7%B4%A0%E6%9D%90/1%20(3)%E5%89%AF%E6%9C%AC.jpg);
}
#father .son2 {
height: 40px;
font-family: "新宋体";
font-size: 24px;
font-weight: bold;
}
#father .son3 {
height: 700px;
float: left;
width: 400px;
}
#father .son4 {
height: 700px;
width: 400px;
float: right;
}
#father .son5 {
height: 100px;
clear: right;
}
</style>
</head>
<body>
<div id="father">
<div class="son1"><img src="/素材/initpintu_副本.jpg" width="800" height="340" /></div>
<div class="son2">首页 作品介绍 作品观赏</div>
<div class="son3">son3 </div>
<div class="son4">son4 </div>
<div class="son5">son5 </div>
非常感谢 非常感谢 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询