1. index.html

<!--
 * @Author: your name
 * @Date: 2021-03-04 16:27:09
 * @LastEditTime: 2021-03-04 16:37:03
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \Front-end Development\index.html
-->
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <link rel="stylesheet" href="css/style.css" />
        <link rel="stylesheet" href="css/icofont.css" />
        <title>登录界面</title>
    </head>
    <body>
        <div id="bigBox">
            <h1>LOGIN</h1>
            <div class="inputBox">
                <div class="inputText">
                    <span class="iconfont icon-nickname"></span>
                    <input type="text" placeholder="Username" />
                </div>
                <div class="inputText">
                    <span class="iconfont icon-visible"></span>
                    <input type="password" placeholder="Password" />
                </div>
            </div>
            <input class="loginButton" type="button" value="Login" />
        </div>
    </body>
</html>

2. style.css

body
{
    margin: 0;
    padding: 0;
    background-image: url(../img/bgimg.jpg);
    background-repeat: no-repeat;
}

#bigBox
{
    margin: 0 auto;
    margin-top: 200px;
    padding: 20px 50px;
    background-color: #00000680;
    width: 400px;
    height: 300px;
    border-radius: 10px;
    text-align: center;
    background-position: 100px 100px;
}

#bigBox h1
{
    color: white;
}

#bigBox .inputBox .inputText
{
    margin-top: 20px;
}

#bigBox .inputBox .inputText span
{
    color: white;
}

#bigBox .inputBox .inputText input
{
    border:0;
    padding: 10px 10px;
    border-bottom: 1px solid white;
    background-color: #00000000;
    color: white;
}

#bigBox .loginButton
{
    margin-top: 30px;
    width: 150px;
    height: 25px;
    color: white;
    border: 0;
    border-radius: 20px;
    background-image: linear-gradient(to right, #b8cbb8 0%, #b8cbbb 0%, #b465b4 0% );
}

3. iconfont.css

@font-face {font-family: "iconfont";
    src: url('iconfont.eot?t=1591106386397'); /* IE9 */
    src: url('iconfont.eot?t=1591106386397#iefix') format('embedded-opentype'), /* IE6-IE8 */
    url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAPkAAsAAAAACCgAAAOVAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVg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OIOcsxCNzPgi+cbsLJW9aMZkSaljCUOKQBbQXoCAkUmRW1l0cp8/gzwPYgrXFFXpryDmBLWDeTPmWiAPRGmromu5xHnkWSAEAYRlEmAfDCg2QxmQl7cKIUPM8HsEchtmSTlqK5qZX5I83yqoR4/JkSJHUXMcuEDH2NoLTJSqBEslAAAA') format('woff2'),
    url('iconfont.woff?t=1591106386397') format('woff'),
    url('iconfont.ttf?t=1591106386397') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
    url('iconfont.svg?t=1591106386397#iconfont') format('svg'); /* iOS 4.1- */
}

.iconfont{
    font-family: "iconfont" !important;
    font-size: 16px;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.icon-visible::before{
    content: "\e6a2";
}

.icon-nickname::before{
    content: "e6a0";
}

4. 界面效果

在这里插入图片描述

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐