h5表单(属性)

代码如下:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style>
            form{
                width: 1000px;
                max-width: 640px;
                min-width: 320px;
                margin:0 auto;
                font-size:20px
            }
            input{
                display: block;
                height: 30px;
                font-size: 20px;
                width: 100%;
                margin: 10px 0;
            }
        </style>
    </head>
    <body>
        <!--表单新增属性-->
        <form action="" >
            <fieldset>
                <legend>表单属性</legend>
                <label for="">
                    用户名:<input type="text" placeholder="例如:小左" 
                        required="required" autocomplete="on" name="username"/>
                </label>
                
                邮箱
                <input type="email" name="email" />
            
                <label for="">
                    电话:<input type="tel" pattern="1\d{10}"/>
                </label>
               
                <!--上传文件-->
                <input type="file" name="file" multiple="multiple" />
                
                <input type="submit" />
            </fieldset>
        </form>
    </body>
</html>

猜你喜欢

转载自blog.csdn.net/zuo_zuo_blog/article/details/88853365