WelcomeItem.vue 4.3 KB
Newer Older
6
UPDATE  
64104061f23fda247c679fa8 已提交
1
<template>
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
  <div class="container">
        <div class="from-box">
            <!-- 注册 -->
            <div class="register-box hidden">
                <h1>register</h1>
                <input type="text" placeholder="用户名" id="reg_user">
                <input type="number" placeholder="手机号" id="reg_phone" >
                <input type="password" placeholder="密码">
                <input type="password" placeholder="确认密码">
                <button id="reg_submit">注册</button>
            </div>
            <!-- 登录 -->
            <div class="login-box">
                <h1>login</h1>
                <input type="text" placeholder="用户名">
                <input type="password" placeholder="密码">
                <button>登录</button>
            </div>
        </div>
        <div class="con-box left">
                    
            <img src="./img/1.png" alt="">
            <p>已有账号</p>
            <button id="login">去登录</button>
        </div>
        <div class="con-box right">
            
            <img src="./img/1.png" alt="">
            <p>没有账号?</p>
            <button id="register">去注册</button>
        </div>
6
UPDATE  
64104061f23fda247c679fa8 已提交
33 34 35 36
    </div>
</template>

<style scoped>
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
*{
  /* 初始化 */
  padding: 0;
  margin: 0;
}

html,body{
  /* 100%的窗口高度 */
  height: 100vh;
  /* 弹性布局 水平+垂直居中 */
  display: flex;
  align-items: center;
  justify-content: center;
  /* 渐变背景 */
  background: linear-gradient(200deg,#f3e7e9,#e3eeff);
  -ms-overflow-style: none; 
  
}


input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.container{
  background-color: #fff;
  width: 650px;
  height: 415px;
  /* 阴影 */
  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);
  /* 相对定位 */
  position: relative;
}
.from-box{
  /* 绝对定位 */
  position: absolute;
  top: -10%;
  left: 5%;
  background-color: #d3b7d8;
  width: 320px;
  height: 500px;
  border-radius: 5px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
   /* 弹性布局 水平+垂直居中 */
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 2;
   /* 动画过渡 加速之后 减速 */
   transition: 0.5s ease-in-out;
}

.register-box,.login-box{
  /* 弹性布局 垂直排列 */
6
UPDATE  
64104061f23fda247c679fa8 已提交
91
  display: flex;
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.hidden{
  display: none;
  transition: 0.5s;
}

h1{
  text-align: center;
  margin-bottom: 25px;
  /* 大写字母 */
  text-transform: uppercase;
  color: #fff;
  /* 字间距 */
  letter-spacing: 5px;
}

input{
  background-color: transparent;
  width: 70%;
  color: #fff;
  border: none;
  /* 下边框样式 */
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding: 10px 0;
  text-indent: 10px;
  margin: 8px 0;
  font-size: 14px;
  /* 字间距 */    
  letter-spacing: 2px;
}
input::placeholder{
  color: #fff;
}

input:focus{
  color: #a262ad;
  outline: none;
  border-bottom: 1px solid #a262ad80;
  transition: 0.5s;
}
input:focus::placeholder{
  opacity: 0;
6
UPDATE  
64104061f23fda247c679fa8 已提交
137 138
}

139 140 141 142 143 144 145 146 147 148 149
.from-box button{
  width: 70%;
  margin-top: 35px;
  background-color: #f6f6f6;
  outline: none;
  border-radius: 8px;
  padding: 13px;
  color: #a262ad;
  letter-spacing: 2px;
  border: none;
  cursor: pointer;
6
UPDATE  
64104061f23fda247c679fa8 已提交
150 151
}

152 153 154 155 156 157 158 159 160
.from-box button:hover{
  background-color: #a262ad;
  color: #f6f6f6;
  transition: background-color 0.5s ease;
}

.con-box{
  width: 50%;
  /* 弹性布局 垂直排列 居中 */
6
UPDATE  
64104061f23fda247c679fa8 已提交
161
  display: flex;
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* 绝对定位 */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.con-box.left{
  left: -2%;
}

.con-box.right{
  right: -2%;
}

.con-box h2{
  color: #8e9aaf;
  font-size: 25px;
  font-weight: bold;
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 4px;
}

.con-box p{
  font-size: 12px;
  letter-spacing: 2px;
  color: #8e9aaf;
  text-align: center;
6
UPDATE  
64104061f23fda247c679fa8 已提交
193
}
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
.con-box span{
  color: #d3b7d8;
}

.con-box img{
  width: 150px;
  height: 150px;
  opacity: 0.9;
  margin: 40px 0;
}

.con-box button{
  margin-top: 3%;
  background-color: #fff;
  color: #a262ad;
  border: 1px solid #d3b7d8;
  padding: 6px 10px;
  letter-spacing: 1px;
  outline: none;
  /* 鼠标放上变小手 */
  cursor: pointer;
}
.con-box button:hover{
  background-color: #a262ad;
  color: #f6f6f6;
}

6
UPDATE  
64104061f23fda247c679fa8 已提交
221
</style>
222 223