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

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

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>


目录
相关文章
|
缓存 小程序 前端开发
商城/点餐/家政类小程序源码合集_微信抖音小程序源码开发从入门到精通实战
本文系统讲解如何利用现有源码快速开发商城、点餐、家政类微信/抖音小程序,涵盖环境搭建、核心功能实现、多平台部署与优化,提供完整技术方案。实战导向,助力开发者高效入门与落地。
|
小程序 PHP 图形学
热门小游戏源码(Python+PHP)下载-微信小程序游戏源码Unity发实战指南​
本文详解如何结合Python、PHP与Unity开发并部署小游戏至微信小程序。涵盖技术选型、Pygame实战、PHP后端对接、Unity转换适配及性能优化,提供从原型到发布的完整指南,助力开发者快速上手并发布游戏。
|
存储 小程序 Java
热门小程序源码合集:微信抖音小程序源码支持PHP/Java/uni-app完整项目实践指南
小程序已成为企业获客与开发者创业的重要载体。本文详解PHP、Java、uni-app三大技术栈在电商、工具、服务类小程序中的源码应用,提供从开发到部署的全流程指南,并分享选型避坑与商业化落地策略,助力开发者高效构建稳定可扩展项目。
|
消息中间件 缓存 小程序
婚恋交友相亲公众号app小程序系统源码「脱单神器」婚恋平台全套代码 - 支持快速二次开发
这是一套基于SpringBoot + Vue3开发的婚恋交友系统,支持微信公众号、Uniapp小程序和APP端。系统包含实名认证、智能匹配、视频相亲、会员体系等功能,适用于婚恋社交平台和相亲交友应用。后端采用SpringBoot 3.x与MyBatis-Plus,前端使用Vue3与Uniapp,支持快速部署和二次开发。适合技术团队或有经验的个人创业者使用。
1209 8
|
小程序 Java 关系型数据库
weixin030英语学习交流平台小程序+ssm(文档+源码)_kaic
本文介绍了英语学习交流平台小程序的开发全过程,包括系统分析、设计与实现。该小程序基于Java的SSM框架进行后端管理开发,使用MySQL作为数据库,并借助微信开发者工具确保系统稳定性。小程序设有管理员和用户两个角色,功能涵盖个人中心、每日打卡、学习计划、论坛交流等,具有操作简单、界面清晰、功能齐全的特点。通过技术可行性、经济可行性和操作可行性分析,证明了系统的实用性和高效性,为英语学习者提供了一个便捷的交流平台。
|
小程序 Java 关系型数据库
圈子系统公众号app小程序系统源码圈子系统带即时通讯 多级圈子系统源码 兴趣小组系统开源 私密圈子系统代码 会员制社区系统
本圈子系统解决方案提供即时通讯、多级圈子、兴趣小组、私密社区及会员制管理功能。支持开源与商业方案,推荐ThinkSNS+、EasyClub及OpenFire等系统,并提供前后端技术选型建议,助力快速搭建社交平台。
787 0
|
小程序 JavaScript Java
基于SpringBoot的智慧停车场微信小程序源码分享
智慧停车场微信小程序主要包含管理端和小程序端。管理端包括停车场管理,公告信息管理,用户信息管理,预定信息管理,用户反馈管理等功能。小程序端包括登录注册,预约停车位,停车导航,停车缴费,用户信息,车辆信息,钱包充值,意见反馈等功能。
1362 5
基于SpringBoot的智慧停车场微信小程序源码分享
|
小程序 Java 关系型数据库
weixin116大学生就业平台微信小程序+ssm(文档+源码)_kaic
本文介绍了一款大学生就业平台微信小程序的开发过程,涵盖开发环境、系统设计、实现与测试等方面。该小程序基于微信平台特性,采用MYSQL数据库存储数据,确保系统稳定与安全,同时满足学生、企业和管理员不同权限用户的功能需求。通过简化操作流程,实现了招聘信息查看、简历投递等实用功能,旨在为用户提供便捷高效的求职体验,符合“操作简单,功能实用”的设计理念。
|
小程序 Java 关系型数据库
weixin163基于微信小程序的校园二手交易平台系统设计与开发ssm(文档+源码)_kaic
本文介绍了一款基于微信小程序的校园二手物品交易平台的开发与实现。该平台采用Java语言开发服务端,使用MySQL数据库进行数据存储,前端以微信小程序为载体,支持管理员和学生两种角色操作。管理员可管理用户、商品分类及信息、交易记录等,而学生则能注册登录、发布购买商品、参与交流论坛等。系统设计注重交互性和安全性,通过SSM框架优化开发流程,确保高效稳定运行,满足用户便捷交易的需求,推动校园资源共享与循环利用。
|
小程序 数据安全/隐私保护
跑腿小程序系统源码
这是一款跑腿小程序,带有智能派单、系统派单、同城配送、校园跑腿、预约取件、用户端+骑手端 基于FastAdmin+thinkphp和uniapp开发的优创同城跑腿系统,支持帮取、帮送模式,包含用户端、骑手端、运营后台。
747 32