-1
完全不可思议,我无法修复它,所以它居中...最后,我玩弄了不同的宽度%,并得出结论,减少%让它居中......但似乎倒退.. ..有人只是解释为什么它这样做....我的意思是我得到它的工作,但我不想在我的大脑中烧掉这种技术,如果它只有一个委婉或什么....请解释降低宽度%允许居中表单?
HTML代码
<form action="mailto:[email protected]" method="post">
<input type="text" id="fName" maxlength="20" size="30" placeholder="First Name" required="required" autocomplete="on"><br />
<input type="text" id="lName" maxlength="20" size="30" placeholder="Last Name" required="required" autocomplete="on"><br />
<input type="email" id="email" maxlength="30" size="30" placeholder="Email" required="required" autocomplete="on"><br />
<textarea name="message" rows="5" cols="30" maxlength="100" wrap="hard" placeholder="Message..." required="required" /></textarea></p>
<input type="submit" name="submit" value="Submit" />
<input type="reset" name="clear" value="Clear" />
</form>
</body>
</html>
这里是窗体的CSS代码....我想100%,它没有工作......后来终于不得不静下心来,25%,以居中。 ...你可以在www.saucysbulldogs.com看到它
form {
padding:10px;
width:25%;
margin-left:auto;
margin-right:auto;
}
感谢