意见箱
恒创运营部门将仔细参阅您的意见和建议,必要时将通过预留邮箱与您保持联络。感谢您的支持!
意见/建议
提交建议

如何设计一个HTML用户注册页面,代码是什么

来源:恒创科技 编辑:恒创科技编辑部
2024-01-12 07:48:59
今天就跟大家聊聊有关“如何设计一个HTML用户注册页面,代码是什么”的内容,可能很多人都不太了解,为了让大家认识和更进一步的了解,小编给大家总结了以下内容,希望这篇“如何设计一个HTML用户注册页面,代码是什么”文章能对大家有帮助。
 


设计上图中的网页:


如何设计一个HTML用户注册页面,代码是什么

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>

            form{
                width: 800px;
                height: 700px;
                border: 1px solid red;
                margin: auto;
                background: url(images/tree.jpg) no-repeat -40px 300px;
            }

            form h3{
                margin-left: 200px;
            }

            p{
                margin-left: 200px;
            }

            hr{
                margin-left: 200px;
            }

             .a1{
                 margin-left: 85px;
             }

             .a2{
                margin-left: 110px;
            }


            input,
            textarea
            {
            background: url(images/attention.png) no-repeat right;
            }

            button{
                margin-left: 200px;
                background: rgb(81, 187, 125);
                color: white;
            }

            span#as:hover input{
                width: 300px;
                height: 40px;
            }

           
    </style>

</head>

<body>
        

        <form action="">
            <h3>用户注册:</h3>

            <hr>
            
            <p>用户昵称:<span class="a1" id="as"><input type="text" required placeholder autofocus></span> <hr></p>

            <p>注册邮箱:<span class="a1" id="as"><input type="email" required placeholder="javin@example.com"></span><hr></p>

            <p>密码: <span class="a2" id="as"><input type="password" required placeholder></span><hr></p>

            <p>性别:<span class="a2">男<input type="radio" name="1" checked>
                女 <input type="radio" name="1"> </span><hr>
             </p>

             <p>年龄:<span class="a2" id="as"><input type="number" name="number1" required placeholder></span><hr></p>

             <p>兴趣爱好:<span class="a1">
                足球<input type="checkbox" name="1">
                篮球<input type="checkbox" name="1">
                游泳<input type="checkbox" name="1">
                唱歌<input type="checkbox" name="1">
                跑步<input type="checkbox" name="1">
                瑜伽<input type="checkbox" name="1">
             </span><hr></p>

            <p>自我介绍: <span class="a1"><textarea name="abcde" cols="30" rows="10" required placeholder>Please enter your message</textarea></span><hr> </p>

            <button type=submit>立即注册</button>

             
            <div></div>



        </form>

</body>

</html>

感谢各位的阅读,以上就是“如何设计一个HTML用户注册页面,代码是什么”的内容了,经过本文的学习后,相信大家对如何设计一个HTML用户注册页面,代码是什么都有更深刻的体会了吧。这里是恒创科技,小编将为大家推送更多相关知识点的文章,欢迎关注!
上一篇: HTML中获取或监听相关属性有哪些,用法是什么 下一篇: 手机怎么远程登录云服务器?