表单进阶效果图:
html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="../css/index.css" />
</head>
<body>
<form class="container">
<h1>用户注册</h1>
<div class="form-item">
<input
class="txt"
type="text"
maxlength="11"
placeholder="请输入11位手机号"
/>
<!-- value表示已经输入的文本 placeholder是占位符 -->
</div>
<div class="form-item clearfix">
<input class="txt left code" type="text " placeholder="青填写验证码" />
<button type="button" class="right">发送验证码</button>
<!-- 有按钮的地方用button type=button 变成普通按钮 -->
</div>
<div class="form-item">
<input class="txt"