我尝试在体内移动Html元素,但我无法弄清楚我想要的例子 浏览器中间的表格标签(必须只有表格标签)我无法弄清楚怎么做可以任何人帮助我并建议我应该阅读哪些主题以便最后找出如何移动HTML元素(可能链接一些文章,我可以在哪里阅读)
答案 0 :(得分:0)
根据您的评论,我假设您正在谈论以表格为中心。
创建表单,例如
<div id="formContainer">
// Your form will go here.
</div>
然后指定一些将窗体居中的CSS
#formContainer
{
position: absolute;
width: 200px;
height: 200px;
left: 50%;
top: 50%;
margin-left: -100px; // Should be -(width/2).
margin-top: -100px; // Should be -(height/2).
}
这会将您的表单放在HTML页面的中间。