如圖:style中所寫(xiě) div banner 下的img 屬性沒(méi)有生效,body的屬性未生效但其他div標(biāo)簽屬性生效網(wǎng)站目錄如下<!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>個(gè)人空間</title><link rel="stylesheet" type="text/css" href="style/style.css"/></head><body><div id="top"></div><div id="nav"></div><div id="banner">?<img src="image/9.png" width="150" height="150"? />?<div class="banner_right">? ? ?</div></div><div id="contet" >?<div class="content_left"></div>??? <div class="content_right"> ?大家好歡迎來(lái)到我的網(wǎng)站。??? </div></div><div id="footer"></div></body></html>
<style?type="text/css">
body{
?margin:?0;
?padding:?0;
?font-size:?24px;
?text-align:?center;
?background-color:?#111;
?background-image:url(../image/body-background.jpg);
?background-attachment:fixed;
?background-repeat:?no-repeat;
}
#top{
?width:980px;
?height:0px;
?background-color:#CCC;
?margin:0?auto;
}
#nav{
?width:980px;
?height:0px;
?background-color:#ccc;
?margin:?5px?auto;
}
#banner{
?width:?980px;
?height:?200px;
?background-color:?#222;
?margin:?0?auto;
}
.banner_left{
?width:?200px;
?height:?200px;
?background-color:?#333;
?float:?left;
}
.banner_right{
?width:775px;
?height:200px;
?background-color:#333;
?float:right;
?
}
#icon{
?width:150px;
?height:150px;
?position:relative;
?left:25px;
?top:25px;
?overflow:hidden;
}
#contet{
?width:980px;
?height:auto;
?margin:5px?auto;
?overflow:hidden;
}
.content_left{
?width:250px;
?height:500px;
?background-color:#333;
?float:left;
}
.content_right{
?width:725px;
?height:auto;
?background-color:#333;
?float:right;
}
#footer{
?width:980px;
?height:120px;
?background-color:#333;
?margin:0?auto;
}
?
#Navigate{
?
?}
?
#banner.img{
?position:?absolute;
?right:?20px;
?border:?2px?solid?#ccc;
?top:?20px;
}
?
</style>
1 回答

qq_安安_17
TA貢獻(xiàn)49條經(jīng)驗(yàn) 獲得超52個(gè)贊
?div banner 下的img 屬性沒(méi)有生效,指的是什么?路徑確定寫(xiě)對(duì)了嗎?
body什么屬性沒(méi)生效?如果是下面這些沒(méi)有生效,在div中添加文字或者其他組件才能有效吧,你寫(xiě)的都是一些空的div。
margin: 0;
padding: 0;
font-size: 24px;
text-align: center;
感覺(jué)您的問(wèn)題沒(méi)有表述清楚
這個(gè)地方寫(xiě)錯(cuò)了。
添加回答
舉報(bào)
0/150
提交
取消