好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

大神来急救:关于background-image无法显示!_html/css_WEB-ITnose

先把我得代码贴一下:



登陆页面

body{ //背景全蓝色
margin:0px;
padding:0px;
font-size:12px;
background-color:#007CBF;
overflow:hidden;
text-align:center;
}
#container{
//网页容器
width:980px;
}

#login{
//放上一张图片436*273像素,但是图片出不来
background-image:url(images/xiongdi.gif);
width:436px;
height:273px;
margin-top:120px;

}
#form{
//把用户名和密码form放在上面的表格上去,我觉得这两个东西虽然是用div套起来的,但是应该算是单独的两个元素吧,这里设175放在图片的合适位置,但是它好像和图片成为一块,设置这个的margin时候图片跟着动,设置上面的login时候,form也跟着动!!为什么???
margin-top:175px;
}

#inp div input{
width:120px;
height:15px;
background-color:#333;
border:0px;
color:#0FF;
}
#button {
margin-left:25px;
margin-top:8px;

}
#button input{
border:0px;
width:49px;
heigth:18px;
color:#666;
margin-left:8px;
cursor:hand;
}










查看更多关于大神来急救:关于background-image无法显示!_html/css_WEB-ITnose的详细内容...

  阅读:32次