太奇葩了
html文件里面的代码:
<div class="nav">
<div class="nav_right"></div>
<div class="nav_mid"></div>
<div class="nav_right"></div>
</div>
css文件里面代码:
.nav{
height:40px;
}
.nav_left {
width: 10px;
background:url(../images/nav_left.jpg) no-repeat;
}
.nav_mid{
width:980px;
background:url(../images/nav_bg.jpg) repeat-x;
}
.nav_right{
width:10px;
background:url(../images/nav_right.jpg) no-repeat;
}
.nav_left,.nav_mid,.nav_right{
float:left; // !!!!!!!在这里将left改为right就能水平排列了,真的太奇葩……为神马啊!
height:40px;
}
晚安sp