小程序酷炫动态登录页源码(动态水滴)

简介: 小程序酷炫动态登录页源码(动态水滴)

1. 页面效果

登陆页面一般都要酷炫好看一点,这里分享一个动态登录页面,页面有三个流动的小水滴。一个水滴放登录框。剩下两个水滴跳转页面和打开弹窗。

2. 代码内容

<template>
  <view class="login-page">
    <u-gap height="80" ></u-gap>
    <div class="container">
      <div class="drop">
        <div class="content">
          <h2 style="font-weight: bolder">XXXX平台</h2>
          <form>
            <div class="inputBox">
              <input type="text" v-model="loginForm.username" placeholder="请输入平台手机号">
            </div>
            <div class="inputBox" style="margin-top: 20rpx">
              <input type="password" v-model="loginForm.password" placeholder="请输入平台密码">
            </div>
            <div class="inputBox" style="margin-top: 30rpx;width: 80%;margin-left: 10%;text-align: center;" @click="submitLogin">
              <span class="submit" >登录</span>
            </div>
          </form>
        </div>
      </div>
    </div>
    <a href="#" class="btns" @click="openReg">注册</a>
    <a href="#" class="btns signup" @click="goToWechart">微信登录</a>
  </view>
</template>
<script>
  import UGap from "../../uview-ui/components/u-gap/u-gap.vue";
  export default {
    components: {UGap},
    data() {
      return {
        loginForm:{
          username:'',
          password:''
        },
      }
    },
    onLoad(option) {
      uni.hideHomeButton()
      // if (option.url) {
      //  this.url = option.url;
      // }
    },
    methods: {
      submitLogin(){
        if(this.loginForm.phone==''){
          this.$interactive.toast('平台手机号不能为空')
          return;
        }else if(this.loginForm.password==''){
          this.$interactive.toast('平台密码号不能为空')
          return;
        }
      },
      isPhone(phone){
        const regMobile = /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
        if (regMobile.test(phone)) {
          return true;
        }else{
          return false;
        }
      },
      goToWechart(){
        uni.clearStorageSync()
        uni.reLaunch({
          url: '/pages/index/index',
        });
      }
    }
  }
</script>
<style>
*
{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
body
{
  display: flex;
  justify-content: center;
  min-height: 100vh;
  background: #eff0f4;
}
.container
{
  position: relative;
  /*left: -80px;*/
  display: flex;
  justify-content: center;
}
.container .drop
{
  position: relative;
  width: 650rpx;
  height: 650rpx;
  box-shadow: inset 20px 20px 20px rgba(0,0,0,0.05),
  25px 35px 20px rgba(0,0,0,0.05),
  25px 30px 30px rgba(0,0,0,0.05),
  inset -20px -20px 25px rgba(255,255,255,0.9);
  transition: 0.5s;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 52% 48% 33% 67% / 38% 45% 55% 62%;
  animation: move 8s linear infinite forwards;
}
.container .drop:hover
{
  border-radius: 50%;
}
.container .drop::before
{
  content: '';
  position: absolute;
  top: 80rpx;
  left: 119rpx;
  width: 45rpx;
  height: 45rpx;
  border-radius: 50%;
  background: #fff;
  opacity: 0.9;
}
.container .drop::after
{
  content: '';
  position: absolute;
  top: 130rpx;
  left: 160rpx;
  width: 25rpx;
  height: 25rpx;
  border-radius: 50%;
  background: #fff;
  opacity: 0.9;
}
.container .drop .content
{
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 40px;
  gap: 15px;
}
.container .drop .content h2
{
  position: relative;
  color: #333;
  font-size: 1.5em;
}
.container .drop .content form
{
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  align-items: center;
}
.container .drop .content form .inputBox
{
  position: relative;
  width: 425rpx;
  box-shadow: inset 2px 5px 10px rgba(0,0,0,0.1),
  inset -2px -5px 10px rgba(255,255,255,1),
  15px 15px 10px rgba(0,0,0,0.05),
  15px 10px 15px rgba(0,0,0,0.025);
  border-radius: 25px;
  display: flex;
  font-weight: bolder;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.container .drop .content form .inputBox::before
{
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 5px;
  background: rgba(255,255,255,0.5);
  border-radius: 5px;
}
.container .drop .content form .inputBox input
{
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 1em;
  padding: 10px 15px;
}
.container .drop .content form .inputBox .submit
{
  color: #fff;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.1em;
  font-weight: 500;
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 1em;
  padding: 10px 15px;
}
.container .drop .content form .inputBox:last-child
{
  width: 300rpx;
  background: #ff0f5b;
  box-shadow: inset 2px 5px 10px rgba(0,0,0,0.1),
  15px 15px 10px rgba(0,0,0,0.05),
  15px 10px 15px rgba(0,0,0,0.025);
  transition: 0.5s;
}
.container .drop .content form .inputBox:last-child:hover
{
  width: 300rpx;
}
.btns
{
  position: absolute;
  right: 60rpx;
  bottom: 0;
  width: 120px;
  height: 120px;
  background: #c61dff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  line-height: 1.2em;
  letter-spacing: 0.1em;
  font-size: 0.8em;
  transition: 0.25s;
  text-align: center;
  box-shadow: inset 10px 10px 10px rgba(190,1,254,0.05),
  15px 25px 10px rgba(190,1,254,0.1),
  15px 20px 20px rgba(190,1,254,0.1),
  inset -10px -10px 15px rgba(255,255,255,0.5);
  border-radius: 44% 56% 65% 35% / 57% 58% 42% 43%;
  animation: move2 8s linear infinite forwards;
  /*去掉蓝色色块*/
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.btns::before
{
  content: '';
  position: absolute;
  top: 15px;
  left: 30px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.45;
}
.btns.signup
{
  bottom: 280rpx;
  left: 60rpx;
  width: 80px;
  height: 80px;
  border-radius: 49% 51% 52% 48% / 63% 59% 41% 37%;
  background: #01b4ff;
  box-shadow: inset 10px 10px 10px rgba(1,180,255,0.05),
  15px 25px 10px rgba(1,180,255,0.1),
  15px 20px 20px rgba(1,180,255,0.1),
  inset -10px -10px 15px rgba(255,255,255,0.5);
  animation: move3 8s linear infinite forwards;
}
.btns.signup::before
{
  left: 20px;
  width: 15px;
  height: 15px;
}
.btns:hover
{
  border-radius: 50%;
}
@keyframes move {
  30% {
    border-radius: 30% 57% 36% 64% / 30% 52% 48% 70%;
  }
  60% {
    border-radius: 30% 57% 61% 39% / 30% 52% 48% 70%;
  }
}@keyframes move2 {
   30% {
     border-radius: 36% 64%  30% 60% / 48% 70% 30% 52% ;
   }
   60% {
     border-radius: 61% 39%  30% 60% / 48% 70%  30% 52%;
   }
}
@keyframes move3 {
  30% {
    border-radius: 60%  30% 64%  36% /52% 30% 70% 48% ;
  }
  60% {
    border-radius: 60%  30% 39% 61%  /52% 30% 70% 48% ;
  }
}
</style>


目录
相关文章
|
2月前
|
存储 小程序 算法
东郊到家预约系统开发|源码案例|小程序
区块链的最重要特性是去中心化,它不依赖于任何中心机构或第三方信任
|
2月前
|
前端开发 小程序 JavaScript
电商小程序04实现登录逻辑
电商小程序04实现登录逻辑
|
3月前
|
存储 小程序 安全
东郊到家小程序系统开发|源码部署|案例详情
智能合约是基于区块链技术的一种计算机程序
|
3月前
|
小程序 数据管理 BI
智慧班牌云平台源码 智慧校园系统,家校互通小程序源码
智慧电子班牌系统包括:SaaS云平台端、智慧校园管理平台端、家长/教师微信移动端、智慧班牌学生端四大软件平台。
智慧班牌云平台源码 智慧校园系统,家校互通小程序源码
|
2月前
|
小程序 JavaScript 前端开发
基于微信小程序的商城购物系统的设计与实现(论文+源码)_kaic
基于微信小程序的商城购物系统的设计与实现(论文+源码)_kaic
|
11天前
|
小程序 前端开发 Android开发
微信小程序(van-tabs) 去除横向滚动条样式(附加源码解决方案+报错图)
微信小程序(van-tabs) 去除横向滚动条样式(附加源码解决方案+报错图)
10 1
|
23天前
|
人工智能 小程序 Java
Java智慧校园系统源码 微信小程序+电子班牌
通过设备管理对百纳智慧校园的智慧班牌以及百纳智慧屏(校牌)进行统一集中式管理,支持浏览所有设备的基本信息以及在离线状态,支持添加设备、设备一键开关机、一键重启、设置节假日开关机时间、设置日常开关机时间、远程班牌截屏、远程班牌升级等操作。
|
26天前
|
小程序
大转盘抽奖小程序源码
大转盘抽奖小程序源码,测试依旧可用,无BUG,跑马灯旋转效果,非常酷炫。
18 1
|
2月前
|
移动开发 小程序 NoSQL
上门家政按摩H5小程序源码
1、服务器环境:CentOS7 + 宝塔 + Nginx + php 2、环境:PHP7.2+ MySQL5.6 3、安装扩展:fileinfo、redis
21 2
上门家政按摩H5小程序源码
|
2月前
|
小程序 JavaScript 数据安全/隐私保护
分享全栈开发医疗小程序 -带源码课件(课件无解压密码),自行速度保存
看到好多坛友都在求SpringBoot2.X + Vue + UniAPP,全栈开发医疗小程序 - 带源码课件,我看了一下,要么链接过期,要么课件有压缩密码。特意整理了一份分享给大家,个人认为还是比较全面的。希望对大家有所帮助!课程仅供大家学习交流使用!
37 1
分享全栈开发医疗小程序 -带源码课件(课件无解压密码),自行速度保存