div+css实现暗色手机密码输入解锁效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现暗色手机密码输入解锁效果代码

代码标签: div css 暗色 手机 密码 输入 解锁

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
 
  <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&amp;display=swap'>
  <style>
      * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-image: linear-gradient(24deg, #18013c 8%, #8536fb);
    font-family: "Open Sans", sans-serif;
    background-size: 100% 100vh;
    color: #c5c5ff;
}

.box-button {
    width: 186px;
    margin: auto;
    margin-top: 50px;
}

.line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 9px;
}

.line:last-child {
    margin-bottom: 0;
}

.button {
    display: flex;
    width: 50px;
    height: 50px;
    border-radius: 100%;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.1s;
}

.button svg {
    width: 18px;
    height: auto;
}

.button:active {
    background-color: #261748;
}

.box-status {
    display: flex;
    width: 105px;
    margin: auto;
    justify-content: space-between;
    margin-top: 50px;
}

.status {
    background: #303147;
    width: 16px;
    height: 16px;
    border-radius: 100%;
    border: 1px solid #c5c5ff;
}

.title {
    text-align: center;
    font-size: 0.6rem;
    margin-top: 50px;
}

.header {
    width: 120px;
    height: 16px;
    background-color: #000000;
    margin: auto;
    border-radius: 0 0 12px 12px;
}

.content {
    width: 100%;
    height: 100%;
    background-color: #0e0f1c;
    border-radius: 30px;
}

.container {
    background-color: #070707;
    padding: 12px;
    width: 250px;
    height: 510px;
    margin: 60px auto;
    border-radius: 37px;
    box-shadow: inset 1px -2px 5px 0 #ffffff2b, 0 4px 5px 0 #18013c, -10px 22px 50px 0 #18013c;
}

.set {
    background: #c5c5ff;
    animation: set 1s;
}

@keyframes set {
    from {
        box-shadow: 0 0 0 5px #202133;
    }
    to {
        box-shadow: 0 0 0 8px transparent;
    }
}

@media only screen and (max-width: 900px) {
    .container {
        position: unset;
        margin: 100px auto;
    }
    body {
        height: inherit;
        overflow: auto;
    }
}

@media only screen and (max-height: 632px) {
    body {
      background-size: auto;
    }
}
  </style>

</head>
<body>
<!-- partial:index.partial.html -->
<div class="container">
        <div class="content">
            <div class="header"></div>
            <p class="title">Enter your password</p>
            <div class="box-status">
                <div class="status st-1"></div>
                <div class="status st-2"></div>
                <div class="status st-3"></div>
                <div class="status st-4"></div>
            </div>
            <div class="box-button">
                <div class="line line-1">
                    <div class="button btn">1</div>
                    <div class="button btn">2</div>
                    <div class="button btn">3</div>
                </div>
                <div class="line line-2">
                    <div class="button btn">4</div>
                    <div class="button btn">5</div>
                    <div class="button btn">6</div>
                </div>
                <div class="line line-3">
                    <div class="button btn">7</div>
                    <div class="button btn">8</div>
                    <div class="button btn">9</div>
                </div>
                <div class="line line-4">
                    <div class="button clear"><svg style="width: 15px;" fill="#c5c5ff" version="1.1" id="Capa_1"
                            xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink".........完整代码请登录后点击上方下载按钮下载查看

网友评论0