读书人

大神来抢救:关于background-image无法

发布时间: 2013-01-23 10:44:49 作者: rapoo

大神来急救:关于background-image无法显示!
先把我得代码贴一下:
<!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>
<title>登陆页面</title>
<style>
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;
}
</style>

</head>

<body>
<div id="container">

<div id="login">
<div id="form">
<form>
<div id="inp">
<div>用户名:<input type="text" name="username"/></div>
<div> 密码:<input type="password" name="password"/></div>
</div>
<div id="button">
<input type="submit" value="注册" />


<input type="button" value="登录" />
</div>
</form>
</div>

</div>

</div>
</body>
</html>
代码中的问题已经指出,其大神帮我看看,给点意见,我这里只是使用html想知道这个问题,没有用css,所以不要叫我换css

读书人网 >CSS

热点推荐