vue登录3D效果
实现的效果
登录动态效果很炫酷,话不多说直接上代码:
组件template
<template>
<div class="entrance">
<div class="header">
<h2>BFF赤川什么什么系统入口</h2>
</div>
<div class="content">
<div class="box" :class="{ hasClick: hasClick, hasClickOff: !hasClick&&goBack }">
<p class="title">网点输入</p>
<div class="input_c">
<div class="shuru">
<div class="icon">
<img src="@/assets/cloud/name_icon.png" alt="" />
</div>
<div><input v-model="formData.name" type="text" placeholder="请输入网点名称" /></div>
</div>
<div class="shuru">
<div class="icon">
<img src="@/assets/cloud/mima_icon.png" alt="" />
</div>
<div><input v-model="formData.password" type="text" placeholder="请输入网点密码" /></div>
</div>
</div>
<div class="foot">
<p class="goin" @click="goIn()">进入</p>
</div>
</div>
<div class="authen" :class="{ appear: hasClick, appearOff: !hasClick&&goBack }">
<div class="circle">
<div class="bg"></div>
</div>
<p class="zi">认证中...</p>
</div>
</div>
</div>
</template>
脚本script
<script>
export default {
name: "entrance",
data() {
return {
hasClick: false,
goBack: false,
formData:{
name: "",
password: ""
}
};
},
components: {},
methods: {
goIn() {
this.hasClick = true;
if(this.formData.name!="" && this.formData.password!=""){
setTimeout(() => {
// 请求后台进行验证...
this.$router.push({
name: "Home",
params: {
id: this.formData.name,
name: this.formData.name,
},
});
}, 1500);
}else{
setTimeout(() => {
this.$confirm('请输网点名称和密码!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
showCancelButton: false,
type: 'warning'
}).then(() => {
this.hasClick = false;
this.goBack = true
})
}, 1500);
}
},
},
};
</script>
样式style
<style lang='scss' scoped>
.entrance {
width: 100%;
height: 100%;
background: url("../assets/cloud/bg1.jpg") center no-repeat;
background-size: 100% 100%;
overflow: hidden;
.header {
width: 100%;
height: 12%;
margin-top: 3%;
background: url("../assets/cloud/title_bg.png") center no-repeat;
background-size: 100% 100%;
h2 {
font-size: r(32);
color: #d8ecff;
text-align: center;
line-height: r(95);
}
}
.content {
width: calc(100% - 30px);
height: r(600);
padding: 15px;
display: flex;
justify-content: center;
align-items: center;
perspective: 800;
-webkit-perspective: 800;
position: relative;
.box {
width: r(360);
height: r(400);
background: linear-gradient(
230deg,
rgba(53, 57, 74, 0) 0%,
rgb(0, 0, 0) 100%
);
box-shadow: -15px 15px 15px rgb(6 17 47 / 70%);
transition: all 1s;
&.hasClick {
animation: animal1 1s linear 1 forwards;
pointer-events: none;
}
&.hasClickOff{
animation: animal11 1s linear 1 forwards;
pointer-events: auto;
}
.title {
color: #f4f4fc;
font-size: r(20);
line-height: r(60);
text-align: center;
margin-top: r(30);
}
.input_c {
margin-top: r(20);
.shuru {
width: r(360);
height: r(75);
display: flex;
justify-content: center;
align-items: center;
color: #f4f4fc;
.icon img {
width: r(26);
height: r(26);
}
input {
width: r(240);
height: r(35);
margin-top: -2px;
background: rgba(57, 61, 82, 0);
left: 0;
padding: 2px 5px;
border-top: 2px solid rgba(57, 61, 82, 0);
border-bottom: 2px solid rgba(57, 61, 82, 0);
border-right: none;
border-left: none;
outline: none;
font-family: "Microsoft Yahei", sans-serif;
box-shadow: none;
color: #61bfff !important;
}
input::-webkit-input-placeholder {
//兼容WebKit browsers(Chrome的内核)
color: #c5c5c9;
}
input::-moz-placeholder {
//Mozilla Firefox 4 to 18
color: #c5c5c9;
}
input::-moz-placeholder {
//Mozilla Firefox 19+
color: #c5c5c9;
}
input::-ms-input-placeholder {
//Internet Explorer 10+
color: #c5c5c9;
}
}
}
.foot {
width: 100%;
height: r(50);
display: flex;
justify-content: center;
align-items: center;
margin-top: r(10);
.goin {
width: r(200);
height: r(40);
margin-top: r(50);
line-height: r(40);
border-radius: r(25);
background: transparent;
border: 2px solid #4fa1d9;
color: #4fa1d9;
text-align: center;
font-size: r(20);
cursor: pointer;
&:hover {
background: #4fa1d9;
color: #fff;
}
}
}
}
.authen{
width: 240px;
height: 120px;
position: absolute;
z-index: inherit;
top: 55%;
left: 50%;
margin-left: -100px;
background: linear-gradient(
230deg,
rgba(53, 57, 74, 0) 0%,
rgb(0, 0, 0) 100%
);
box-shadow: -15px 15px 15px rgb(6 17 47 / 70%);
transition: all 1s;
transform: scale(0);
&.appear{
animation: animal2 1s linear 1 forwards;
}
&.appearOff{
animation: animal22 1s linear 1 forwards;
}
.circle{
width: 100%;
height: 60px;
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
.bg{
width: 50px;
height: 50px;
background: url("../assets/cloud/circle.png") center no-repeat;
background-size: 100% 100%;
animation: animal 1s infinite linear;
}
}
.zi{
font-size: r(20);
color: #fff;
text-align: center;
line-height: 40px;
}
}
}
}
@keyframes animal {
0% {
transform: rotate(0deg);
-ms-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
-ms-transform: rotate(-360deg);
-webkit-transform: rotate(-360deg);
}
}
@keyframes animal1 {
0% {
transform: rotateX(0deg);
}
50% {
transform: rotateX(70deg);
transform-origin: center bottom;
}
100% {
transform: rotateX(70deg) translateX(-200px) scale(0.8);
transform-origin: center bottom;
}
}
@keyframes animal11 {
0% {
transform: rotateX(70deg) translateX(-200px) scale(0.8);
transform-origin: center bottom;
}
50% {
transform: rotateX(0deg);
transform-origin: center bottom;
}
100% {
transform: rotateX(0deg) translateX(0) scale(1);
transform-origin: center bottom;
}
}
@keyframes animal2 {
0% {
transform: scale(0);
}
50% {
transform: scale(1);
}
100% {
transform: scale(1) translateX(100px);
}
}
@keyframes animal22 {
0% {
transform: scale(1) translateX(100px);
}
50% {
transform: scale(1) translateX(0);
}
100% {
transform: scale(0) translateX(0);
}
}
</style>
vue登录3D效果的更多相关文章
- 使用Swiper快速实现3D效果轮播
最近经常接到轮播图3D效果的需求, 特在此记录一下以备之后使用. 具体实现效果如下: 在这里介绍两种使用方式, 一种原生的html+php后端渲染, 一种是使用vue. 原生实现 引入 首先我们介绍原 ...
- 3d效果的图片轮播
CSS3的3d变换 CSS3给我们提供了一个新的功能,那就是3d变换.3d变换和2d变换的基本API函数类似,只不过多了些在Z轴上的操作,不难使用. 但是,为了让元素拥有3d变换的功能,我们需要给他的 ...
- jQuery旋转木马仿3D效果的图片切换特效代码
用jQuery实现的一款仿3D效果的图片切换特效代码,类似旋转木马一样,幻灯图片以三维视觉上下滑动切换,效果很酷炫,兼容IE8.360.FireFox.Chrome.Safari.Opera.傲游.搜 ...
- CSS3打造3D效果——perspective transform的深度剖析
声明:此篇博文虽是自己手写,但大量资源取自 张鑫旭 的博文.想看更详细 更专业的剖析请看张鑫旭的博文. 昨天对css3的transform做了初步的分析和认识,突然看到perspective属性,调了 ...
- CSS3 文本3D效果
代码如下: <!DOCTYPE html> <html> <head> <style> h1 { color: #3D3D3D; font-size: ...
- css3 3d效果及动画学习
css参考手册: http://www.phpstudy.net/css3/ http://www.css88.com/book/css/ 呈现3d效果:-webkit-transform-style ...
- 网页3D效果库Three.js初窥
网页3D效果库Three.js初窥 背景 一直想研究下web页面的3D效果,最后选择了一个比较的成熟的框架Three.js下手 ThreeJs官网 ThreeJs-github; 接下来我会陆续翻译 ...
- 视频特效制作:如何给视频添加边框、水印、动画以及3D效果
2014-12-08 09:47 编辑: suiling 分类:iOS开发 来源:叶孤城的blog 招聘信息: iOS手机软件开发工程师 iOS工程师 Web后端高级开发工程师 iOS软件工程师 ja ...
- 图片设置3D效果
/** * 图片绘制3d效果 * @param srcImage * @param radius * @param border * @param padding * @return * @throw ...
- 火狐的打开3D效果
最近研究网页的时候,想看看一个页面中盒子的层次问题,点击右键查看元素的后,没有发现3D效果的按钮. 在网上百度后说要什么显卡支持,以为是公司的电脑用的是集显,就没有这个功能.回去用自己的笔记本后,发现 ...
随机推荐
- idea技巧-自定义后缀补全
Idea技巧-Postfix Completion 在idea中可以使用.xxx进行后缀补全 比如.sout 如何自定义后缀补全? 比如.log 在idea中打开设置 File | Settings ...
- 单词本z ambition 雄心 amb = ab = about = around = 环绕
ambition 雄心 amb = ab = about = around = 环绕 it = go = 走 ion 名词 重点是 amb 环绕 这里是抽象含义 表示内心向外扩展 所以是雄心 ambu ...
- Pandas导出美化技巧,让你的Excel更出众
pandas的DataFrame可以通过设置参数使得在jupyter notebook中显示的更加美观,但是,将DataFrame的数据导出excel时,却只能以默认最朴素的方式将数据写入excel. ...
- 云流化:XR扩展现实应用发展道路上的新方向
扩展现实的发展已经改变了我们工作.生活和娱乐的方式,而且这才刚刚开始.扩展现实 (Extended reality, XR) 涵盖了沉浸式技术,包括虚拟现实.增强现实和混合现实.从游戏到虚拟制作再到产 ...
- python高级技术(死锁、递归锁、信号量、Event事件、进程池、线程池、协程)
一 死锁和递归锁(了解) 进程也有死锁与递归锁,使用方法类似 所谓死锁: 是指两个或两个以上的进程或线程在执行过程中,因争夺资源而造成的一种互相等待的现象,若无外力作用,它们都将无法推进下去. 此时称 ...
- 记录-Vue移动端日历设计与实现
这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 工作中遇到一个需求是根据日历查看某一天/某一周/某一月的睡眠报告,但是找了好多日历组件都不是很符合需求,只好自己手写一个日历组件,顺便记录 ...
- 记录--前端项目中运行 npm run xxx 的时候发生了什么?
这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 npm 是 node 捆绑的依赖管理器,常用程度可想而知.那么你每天都在 npm/yarn run 的命令到底是如何运行项目的呢? 前端项 ...
- 开发必会系列:hibernate事务
一 事务定义及特性 1.数据库事务的定义:数据库事务(Database Transaction) 是指由一个或多个SQL语句组成的工作单元,这个工作单元中的SQL语句相互依赖,如果有一个SQL语句执 ...
- 【Docker】Dockerfile基础知识,相信你一定有所收获
Dockerfile常用命令 FROM: 继承基础镜像 MAINTAINER:镜像制作作者信息 RUN: 用来执行shell命令 EXPOSE: 暴露端口号 CMD: 启动容器默认执行的命令,会被覆盖 ...
- kingbaseES坏块修复功能
1.自动坏块修复简介 主数据库访问系统表数据.索引.持久化用户表数据.索引时,从磁盘读取数据块至共享缓冲区,如果检测到坏块,自动从备节点获取坏块的副本,并修复坏块. 坏块修复相关参数 参数名称 默认值 ...
