【发布时间】:2013-04-08 13:13:17
【问题描述】:
我希望当我的浏览器窗口调整大小时我的图像大小不会改变,它应该覆盖所有 div 内容.. 问题是当我调整我的窗口背景图像的大小时,它只覆盖显示的浏览器区域,它看起来像我的内容超出了它的 div ..如果有 scollbar ,它就可以了 ..但即使有了那个..plz 帮助也无法找到解决方案。 .
这是我的代码...
<style>
div{
background-width:100%;
background-image: url('back5.jpg');
background-id:back5;
background-overflow-x:scroll;
}
</style>
</head>
<body style="margin:0px;overflow-x:scroll">
<div>
<img src="logo.gif">
<label style="type=text/css;position:absolute;left:600px;top:18px"/>
<font size="5" style="color:#ffffff">E-mail:</font>
</label>
<label style="type=text/css;float:right;position:absolute;left:600px;top:48px"/>
<font size="5" style="color:#ffffff">Password:</font>
</label>
<Input type="text" name="_email" id="e_mail" style= " type=text/css;-webkit-border-radius: 7px;
-moz-border-radius: 7px; border-radius: 7px;
background-color:#D8D8D8;
float:center;position:absolute;
left:720px;top:18px;
width:400px; height:25px"/>
<Input type="text" name="_password" id="pass_word" style="type=text/css;-webkit-border-radius: 7px; -moz-border-radius: 7px;
border-radius: 7px; background-color:#D8D8D8;
float:center;position:absolute;
left:720px ;top:48px; width:400px;
height:25px"/>
<input type="submit" value="LogIn" style="type=text/css; float:center;position:absolute;
left:870px ;width:600px; top:80px; width:60px;
height:25px"/>
</div>
</body>
【问题讨论】:
-
作为一个提示,清理你的代码。删除 HTML 标记上的样式属性并将所有样式移动到顶部的
标签: html css image resize scrollbar