首页 > 开发 > CSS > 正文

浏览器全屏显示背景图片的css样式与html结构

2024-07-11 08:35:20
字体:
来源:转载
供稿:网友

css样式:


<style>
div#div1{
position:fixed;
top:0;
left:0;
bottom:0;
right:0;
z-index:-1;
}
div#div1 > img {
height:100%;
width:100%;
border:0;
}
</style>

html:


<div id=”div1″><img src=”图片路径” /></div>
<div align=”center”>
<table>
<th>登录</th>
<tr>
<td>用户名:</td>
<td><input type=”text” /></td>
</tr>
<tr>
<td>密码:</td>
<td><input type=”text” /></td>
</tr>
<tr>
<td></td>
<td><input type=”reset” /><input type=”button” value=”Login” /></td>
</tr>
</table>
</div>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表