软件1班20240419

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/demo.css">

</head>

<body>

    <!--//
    margin : 0 auto;
    两个参数  第一个参数是  上下外边距    auto  左右 外边距
    上下外边距   0   左右  自动  ()

    -->
    <br><br><br>
    <div class="mydiv">
        <br><br><br>
        <h1 style=" text-align: center;">登录界面</h1>
        <br><br><br><br>
        <form action="#" method="get">
            账号<input type="text" name="id" placeholder="手机号码/邮箱">
            <br>
            密码<input type="password" name="pass" placeholder="数字+ 字母">
            <br>
            <div class="sex-div"> 性别<label><input type="radio" name="sex">男</label>
                <input type="radio" name="sex">女
            </div>
            <br>
            <div class="div-addr">
                地区<select name="addr" >
                    <option value="">--请选择--</option>
                    <option value="广州">广州</option>
                </select>
            </div>
            <input type="submit"  value="注册">


        </form>
    </div>

  


</body>

</html>
css 复制代码
*{
    margin: 0;
    padding: 0;
    /* 外边距  */
    box-sizing: border-box;
}
form{
    text-align: center;
}
.mydiv{
    width: 400px;
    height: 700px;
    background-color: pink;
    /* 整个  div  居中 */
    /* text-align: center; */
    margin: 0 auto;

}
.mydiv .sex-div{
    margin-left: -110px;
}
.mydiv .div-addr{
    margin-left: -94px;
    margin-top: -22px
 
}
相关推荐
西陵21 分钟前
Nx带来极致的前端开发体验——任务编排
前端·javascript·架构
大前端helloworld28 分钟前
从初中级如何迈入中高级-其实技术只是“入门卷”
前端·面试
东风西巷2 小时前
Balabolka:免费高效的文字转语音软件
前端·人工智能·学习·语音识别·软件需求
萌萌哒草头将军2 小时前
10个 ES2025 新特性速览!🚀🚀🚀
前端·javascript·vue.js
半夏陌离2 小时前
SQL 入门指南:排序与分页查询(ORDER BY 多字段排序、LIMIT 分页实战)
java·前端·数据库
whysqwhw3 小时前
鸿蒙工程版本与设备版本不匹配
前端
gnip3 小时前
http缓存
前端·javascript
我不只是切图仔3 小时前
我只是想给网站加个注册验证码,咋就那么难!
前端·后端
该用户已不存在4 小时前
macOS是开发的终极进化版吗?
前端·后端