我尝试在正文中移动 Html 元素,但我不知道如何在浏览器中间放置表单标签(必须只有表单标签),我无法弄清楚怎么做任何人都可以帮助我并建议我应该阅读哪些主题以最终了解如何移动html元素(也许链接一些文章我可以在哪里阅读它)
问问题
1148 次
1 回答
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 页面的中间。
于 2013-10-04T08:37:09.013 回答