可以用结对布局来做..
#a {
position: absolute
top: 100px
right: 200px
width: 300px
}
这个就是把 id为a的元素块 设置到到浏览器的一个绝对位置 不管那个位置有什么 这个元素都会盖在上边
CSS里用一个样式把表格里所有文字都放中间,首先需要理解父级元素的概念,要让所有的表格文字都居中,那么CSS的文字居中属性,自然就要给table,然后通过text-align:center这个属性,就能够所有的文字居中,请看代码:
<html><head>
<style>
table{ //通过class来设置
width:300px
height:200px
text-align:center
}
</style>
</head>
<body>
<table>
<tr>
<td>我是测试文字</td>
</tr>
</table>
</body>
</html>
background:url(images/loginbackground.png)top no-repeat 0px 10px
等同与
background:url(images/loginbackground.png)top no-repeat
background-position: 0px 10px//水平方向(以左上角为原点,x方向)移动 0像素,垂直方向(y轴方向)即向下以动 10 像素
***注意:0px 不能省略,否则默认为x方向移动的距离。也可以设置为百分比值。
修改后: