实例
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>我在PHP中文网学习</title> <style> .box{ margin: 60px auto; width: 500px; height:150px; padding:30px; background-color: #f2f2f2; } .box1{ weight:500px; height:150px; background-color: pink; } .box1 h2{ margin: auto; font-size: 38px; text-align: center; line-height: 150px; } .box-form{ margin: 30px auto; padding: 30px; width: 500px; height: 400px; background-color: #f2f2f2; } .box-form h2{ font-size: 27px; text-align: center; } .box-form-1{ padding: 10px; width: auto; height: auto; background-color: pink; } </style> </head> <body> <div class="box"> <div class="box1"> <h2>我在PHP中文网学习</h2> </div> </div> <form class="" action="" method="post"> <div class="box-form"> <h2>用户注册</h2> <div class="box-form-1"> <label for="name">用户名:</label> <input type="text" name="" id="name" placeholder="用户名不能是中文"> </div> <div class="box-form-1"> <label for="tel">手机号:</label> <input type="text" name="tel" id="tel" placeholder="请使用大陆手机"> </div> <div class="box-form-1"> <label for="password">密码:</label> <input type="text" name="password" id="password" > </div> <div class="box-form-1"> <label for="password-confirm">确认密码:</label> <input type="text" name="password-confirm" id="password-confirm" > </div> <div class="box-form-1"> <input type="submit" name="" value="提交"> </div> </div> </form> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例