问答详情
源自:6-1 使用表单标签,与用户交互 - 使用<form>创建表单

确定,重置按钮怎么在中间?

</head>

<body>

<form   method="post" action="save.php">

<label for="username">用户名:</label>

<input type="text"  name="username" id="username" value="" />

<br/>

<label for="pass">&nbsp;密码&nbsp;:</label>

<input type="password"  name="pass" id="pass" value="" />

<br/>

<input type="submit" value="确定"  name="submit" />

<input type="reset" value="重置" name="reset" />

</form>  

</body>

http://img.mukewang.com/57061fbb0001809b02440086.jpg

提问者:木子晓晓 2016-04-07 16:53

个回答

  • 吹过面颊的风3149717
    2016-04-07 17:29:41

     <body>

    <form   method="post" action="save.php">

    <div align="center">

    <label for="username">用户名:</label>

    <input type="text"  name="username" id="username" value="" />

    <br/>

    <label for="pass">&nbsp;密码&nbsp;:</label>

    <input type="password"  name="pass" id="pass" value="" />

    <br/>

    <div align="center">

    <input type="submit" value="确定"  name="submit" />

    <input type="reset" value="重置" name="reset" />

    </div>

    </div>

    </form>  

     </body>


  • 起灰
    2016-04-07 17:18:46

    <style type="text/css">

    div{

        text-align:center;

    }

    </style>



        <div>

        <input type="submit" value="确定"  />

        <input type="reset" value="重置"  />

        </div>


  • 慕粉3156420
    2016-04-07 17:12:49

    input{margin-left:30px;}

  • qq_徐姑娘_0
    2016-04-07 17:11:55

    加个div  给div写样式 margin:auto;

  • 笑晚
    2016-04-07 17:09:21

    用<center>或者在前面添加空格&nbsp