实战HTML:登陆界面的实现

参加的项目要求书写一个新的登陆界面,参考了一些百度的写法,写了一个固定布局的登陆界面。
第一次正八经儿写HTML,写的不好,应该还存在一些问题,后续会不断把这个代码及这篇文章进行改进。

代码及效果图如下:

LoginActivity.html

<!doctype html>
<html long="zh">
<head>
    <meta charset="utf-8">
    <title>客户应用平台</title>
    <link rel="stylesheet" href="LoginStyle.css">
</head>
<body>
<!--头部显示-->
<nav class="header" id="head">
    <img class="Logo" src="LOGO.jpg">
    <h1 class="LogoName">客户应用平台</h1>
    <img src="TopPic.png" width="100%" height="53">
</nav>
<!--中部内容-->
<div class="wrap" id="wrap">
    <div class="logWrap" >
        <img id="banner" class="banner" src="demo2.jpg" >
        <div class="logShow">
            <!-- 头部提示信息 -->
            <div class="LoginIndex LoginTop">
                <p class="p1">登录</p>
            </div>
            <!-- 输入框 -->
            <div class="InputStr">
                <img src="user.png" width="20" height="20" alt=""/>
                <input type="text"
                       placeholder="输入用户名" />
            </div>
            <div class="InputStr">
                <img src="password.png" width="20" height="20" alt=""/>
                <input type="text"
                       placeholder="输入用户密码" />
            </div>
            <div class="LoginButton">
                <a href="index.html" target="_self"><button>登 录</button></a>
            </div>
        </div>
    </div>
</div>
</body>
</html>

LoginStyle.css

@charset "utf-8";

*{
    margin: 0;
    padding: 0;
}
#head{
    height: 90px;

}
#head .Logo{
    width: 72px;
    height: 72px;
    vertical-align: middle;
}
#head .LogoName{
    font-size:40px;
    font-family:"楷体";
    color:#00BFFF;
    display:inline;
    position: absolute;
    top: 14px;
}
#wrap {
    height: 408px;
    width: 100%;
    position:relative;
}
#wrap .logWrap{
    height: 408px;
    width: 600px;
    position: absolute;
    top: 50%;
    left: 50%;
    right: 50%;
    margin: 0 0 0 -300px;
    display: inline-block;
}
#wrap .banner{
    height: 300px;
    width: 300px;
    position: absolute;
    top: 26%;
}
#wrap .logShow {
    float: right;
    height: 408px;
    width: 368px;
    position: absolute;
    top: 0%;
    left: 55%;
    right: 45%
}
.LoginButton a button {
    width: 100%;
    height: 45px;
    background-color: #21a4ee;
    border: none;
    color: white;
    font-size: 18px;
}
.logShow .LoginIndex.LoginTop .p1 {
    display: inline-block;
    font-size: 28px;
    margin-top: 110px;
    width: 86%;
}
#wrap .logShow .LoginIndex.LoginTop {
    width: 86%;
    border-bottom: 1px solid #ee7700;
    margin-bottom: 60px;
    margin-top: 0px;
    margin-right: auto;
    margin-left: auto;
}
.logShow .InputStr img {
    position: absolute;
    top: 12px;
    left: 8px;
}
.logShow .InputStr input {
    width: 100%;
    height: 42px;
    text-indent: 2.5rem;
}
#wrap .logShow .InputStr {
    width: 86%;
    position: relative;
    margin-bottom: 30px;
    margin-top: 30px;
    margin-right: auto;
    margin-left: auto;
}
#wrap .logShow .LoginButton {
    width: 86%;
    margin-top: 0px;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: auto;
}

代码效果图

在这里插入图片描述

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

KaiSarH

如果觉得文章不错,可以支持下~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值