css练习 登录网页

练习1:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>1</title>
    <style>
        body{
            background: url("./文理教务系统背景.jpg")  center no-repeat fixed;
            }
        .box{
        display: grid;
        grid-template-columns: repeat(6,1fr);
        height: 750px;
        grid-template-rows:repeat(5,1fr);
        grid-gap: 3px;
        }

        .box>div:nth-child(1){
             grid-column: 1/7;
        }
        
        .box>div:nth-child(4){
        background-color:white;
        height: 400px;
        grid-area:2/3/5/5;
        border-radius:4%;
        }

        .box>div:nth-child(15){
            grid-column:1/7;
        }

        .box1{
            color: white;
            font-size:40px;
            text-align:center;
            margin: auto;
        }
        .table{
            margin-top:7%;

        }
        .table1{
            width: 60px;
            height: 12%;
           text-align:center;
           font-size: 16px;
        }
        .table2{
            width: 100%;
            height: 30px;
        }
        .table3{
            width: 100%;
            height:30px;
        }
        .table4{
            width: 100%;
            height:30px;
        }
        .table5{
            width: 100px;
            height:30px;
            color: darkgrey;
        }
        .table51{
            color:darkgray;
            font-size: 15%;
        }
        .table6{
            height: 25%;
            color: orangered;
            font-size: 11px;
            text-align:right ;
        }
        .table7{
            height: 100%;
            background-color:cornflowerblue;
            color: white;
            text-align: center;

        }
        .div1{
            color: red;
            text-align: center;
        }
        .div2{
            margin-left:33%;
        }
        .div2,.div3,.div4{
            color: whiteb;
            font-size: 17px;
            float: left;
            color: white;
        }
        .div3{
            color: blue;
        }
    </style>
</head>
<body>
    <div class="box">
    <div class="box1">KINGOSOFT高校教务管理系统</div>
    <div></div>
    <div></div>
    <div ><table class="table" width="400px" height="340px"  cellspacing=0.1px  align="center">
        <tr>
            <td  class="table1">账号登录</td>
            <td  class="table1">扫码登录</td>
        </tr>
        <tr>
            <td colspan="2">
                <select class="table2" name="bw" id="">
                    <option value="">学生</option>
                    <option value="">教师</option>
                </select>
            </td>
            <!-- <td></td> -->
        </tr>
        <tr>
            <td colspan="2"><input class="table3" type="text"  placeholder="请输入账号" reguired ></td>
            <!-- <td ></td> -->
        </tr>
        <tr>
            <td colspan="2"><input class="table4" type="password" placeholder="请输入密码" ></td>
            <!-- <td></td> -->
        </tr>
        <tr>
            <td><input type="text" class="table5" placeholder="验证码" > </td>
            <td><span class="table51">正常情况 免验证码</span></td>
        </tr>
        <tr>
            <td colspan="2"><span class="table6">忘记密码?</span></td>
            <!-- <td></td> -->
        </tr>
        <tr>
            <td colspan="2"><div class="table7">登录</div></td>
            <!-- <td></td> -->
        </tr>

    </table></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div>
        <div class="div1">运行环境指南</div> 
        <div class="div2">Copyright 2000-2024</div> 
        <div class="div3">青果软件集团有限公司</div>
        <div class="div4">All Rights Reserved</div>
    </div>
    </div>
</body>
</html>

运行结果:

练习2:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>div两栏布局</title>
    <style>
    div{
        /* border:1px solid red; */
        height: 150px;
        }

        .div1{
        padding-top: 6%;
        padding-left: 15%;
        height: 100px;
        }

        .div2{
        height: 300px;
        width: 70%;
        margin: auto;
        }

        .div3{
        height:200px;
        /* background-color:aqua;*/
        }
        .div21,.div22{
        width:49%;
        height: 300px;
        float: left;
        margin:2px;
        
        }
        .div31,.div32{
         width: 49%;
        float: left;
        height: 196px;
        margin: 3px;
        color:darkgrey;
        text-align: center;
        padding-top: 10px;
        }

        .table{
            height: 310px;
        }
        .table1{

            height: 10%;
            font-size:24px;
            text-align:left;
            margin: auto;
        }
        .table2,.table3{
            width: 60%;
            height: 40%;
        }
        .td1,.td2{
            height: 20%;
        }
        .td2{
             padding-left: 5%;
        }
        .table3{
            width: 62%;
        }
        .table4{
            height: 20%;
        }
        .table41{
            width: 30%;
            height: 30%;
        }
        .table42{
            font-size: 20px;
            width: 40%;
            height: 40%;
        }
        .td3{
            width: 55%;
            height: 30px;
        }
        .table5{
            width: 50%;
            background-color:cornflowerblue;
            color: white;
            text-align: center;

        }
    </style>
</head>
<body>
    <div class="div1"> <img src="./QQ截图2024071019593加1.png" alt=""></div>
    <div class="div2">
    <div class="div21"><img src="./211.png"></div>
    <div class="div22">
        <table class="table" width="400px" height="340px"  cellspacing=0.1px  align="center">
            <tr>
                <td class="table1" colspan="2">用户登录</td>
                <!-- <td></td> -->
            </tr>
            <tr>
                <td colspan="2" class="td1">用户名:<input class="table2" type="text" reguired ></td>
                <!-- <td></td> -->
            </tr>
            <tr>
                <td class="td2" colspan="2">密码:<input class="table3" type="password"></td>
                <!-- <td></td> -->
            </tr>
            <tr class="table4">
                <td >验证码:<input class="table41" type="text" reguired ></td>
                <td ><input class="table42" type="text"  placeholder="2vxb" readonly> </td>
            </tr>
            <tr>
                <td class="td3"></td>
                <td class="table5">登录</td>
            </tr>
        </table>
    </div>
    </div>
    <div class="div3">
        <div class="div31">湖南强智科技有限公司版权所有</div>
        <div class="div32">在线人数:11人</div>
    </div>
</body>
</html>

运行结果:

练习3:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3</title>
    <style>

        .div1{
        padding-top: 15px;
        height: 100px;
        }

        .div2{
        height: 480px;
        width: 80%;
        margin: auto;
        }

        .div3{
        height:100px;
        /* background-color:aqua;*/
        }
        .div21,.div22{
        float: left;
        margin:2px;
        height: 460px;
        }
        .div21{
            width: 63%;
        }
        .div22{
            height: 500px;
            width: 35%;
        }
        .div31,.div32{
        width: 49%;
        float: left;
        height: 100px;
        margin: 3px;
        font-size: 12px;
        color:gray;
        }
        .div31{
            text-align: right;
        }

        
        .table1{

            height: 10%;
            font-size:24px;
            text-align:left;
            margin: auto;
        }
        .table2,.table3{
            width: 80%;
            height: 20px;
        }
        .td1,.td2{
            height: 20px;
        }
        .table4{
            height: 7px;
        }
        .table41{
            width: 50%;
            height: 60%;
        }
        .table42{
            font-size: 20px;
            width: 40%;
            height: 40%;
        }
        .table5{
          height: 50px;
            background-color:cornflowerblue;
            color: white;
            text-align: center;
        }
        .table6{
            height: 40px;
            text-align: center;
            color: rgb(215, 109, 109);
            background-color:rgb(253, 199, 199);
        }
        .td4{
            height: 15px;
            color:blue;
            font-size: 11px;
            text-align:right ;
        }
    </style>
</head>
<body>
    <div class="div1"> <img src="./作业3 教学管理信息服务平台.png" alt=""></div>
    <div class="div2">
    <div class="div21"><img src="./login_bg_pic.jpg"></div>
    <div class="div22">
        <table  width="400px" height="460px"  cellspacing=0.1px  align="center">
            <tr>
                <td class="table1" colspan="2"><b>用户登录</b></td>
                <!-- <td></td> -->
            </tr>
            <tr>
                <td colspan="2" class="td1"><input class="table2" type="text" placeholder="用户名" reguired ></td>
                <!-- <td></td> -->
            </tr>
            <tr>
                <td colspan="2" class="td2"><input class="table3" type="password" placeholder="密码"></td>
                <!-- <td></td> -->
            </tr>
            <tr class="table4">
                <td ><input class="table41" type="text" reguired placeholder="验证码"></td>
                <td ><input class="table42" type="text"  placeholder="2vxbx" readonly> </td>
            </tr>
            <tr>
                <td colspan="2" class="td4">忘记密码了?</td>
                <!-- <td></td> -->
            </tr>
            <tr>
                <td colspan="2" class="table5">登录</td>
                <!-- <td></td> -->
            </tr>
            <tr>
                <td colspan="2" class="table6">忘记密码请联系教学秘书或辅导员</td>
                <!-- <td></td> -->
            </tr>
            <tr>
                <td class="table7"><img src="./login_ewm.gif" alt=""></td>
               <td>用手机扫一扫,安全快捷登录</td>
            </tr>
        </table>
    </div>
    </div>
    <div class="div3">
        <div class="div31">版权所有© Copyright 1999-2022 正方软件股份有限公司</div>
        <div class="div32">中国·杭州西湖区紫霞街176号 互联网创新创业园2号301   版本V-8.0.0</div>
    </div>
    </div>
</body>
</html>

运行结果:

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值