`

带有交互动画特效的webapp登录输入密码

阅读更多

带有交互动画特效的webapp登录输入密码

一个比较有创意的登录页面,当你focus密码框即将输入密码的时候,卡通人物会捂住自己的眼睛,blur的时候他就会放开手,非常可爱

<!-- HTML代码片段中请勿添加<body>标签 //-->
<form id="login-form" class="login-form">
        <div class="cartoon">
            <div id="handLeft" class="hand-left">
                <div class="hand"></div>
            </div>
            <div id="handRight" class="hand-right">
                <div class="hand"></div>
            </div>
        </div>
        <div class="it-text-list it-box">
            <div class="it-label">账号</div>
            <div class="it-input">
                <input type="text" placeholder="请输入注册手机号" name="phoneNum" id="phoneNum">
            </div>
        </div>
        <div class="it-text-list it-text-bottom it-box">
            <div class="it-label">密码</div>
            <div class="it-input">
                <input type="password" placeholder="请输入密码" name="password" id="password">
            </div>
        </div>
    </form> 
    <div class="cn-buttons">
        <div class="button bt-red">登录</div>
    </div>
 
    <div class="cn-buttons">
        <div class="button bt-white">注册</div>
    </div>
 


<!-- 推荐开源CDN来选取需引用的外部JS //-->
<script type="text/javascript" src="http://cdn.gbtags.com/jquery/1.11.1/jquery.min.js"></script>

 

/*CSS源代码*/
body { font: 16px/1.5 'STHeiti-Light', 'STXihei', 'HelveticaNeue', 'Helvetica', 'Simsun', Sans-serif; background: #F1F0F6; color: #333; -webkit-text-size-adjust: none; width: 100%; height: 100%; min-width: 320px; min-height: 480px; padding: 0px 0 10px 0 }
.it-box { display: -webkit-box; background-color: #FFF; font-size: 16px; position: relative }
.it-text-list { width: 100%; height: 42px; background-color: #FFF; background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.5, transparent), color-stop(0.5, #E0E0E0), to(#E0E0E0)); background-repeat: repeat-x; background-position: left top; background-size: 100% 1px; text-align: right }
.it-text-bottom { width: 100%; height: 42px; background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.5, transparent), color-stop(0.5, #E0E0E0), to(#E0E0E0)), -webkit-gradient(linear, left top, left bottom, color-stop(0.5, transparent), color-stop(0.5, #E0E0E0), to(#E0E0E0)); background-repeat: repeat-x; background-position: left top, left bottom; background-size: 100% 1px; text-align: right }

.it-text-list .it-label { margin-left: 18px; min-width: 30px; margin-right: 10px; height: 42px; text-align: left; line-height: 42px }
.it-text-list .it-line { margin-left: 18px; min-width: 20px; height: 42px; text-align: left; line-height: 42px; -webkit-box-flex: 1; }
.it-text-list .it-input { position: relative; -webkit-box-flex: 1.0; margin-right: 18px; height: 40px; line-height: 40px; padding: 1px 0 }
.it-text-list .it-input input, .it-text-list .it-input .input { position: absolute; top: 1px;bottom:0; right: 0; text-align: right; border: 0; width: 100%; background-color: #FFF }
.cn-buttons { padding: 0 18px 0 18px; height: 43px;margin:10px 0; }
.cn-buttons .button { display: block; margin: auto; height: 41px; border-radius: 3px; text-align: center; line-height: 41px; font-size: 16px; }
.cn-buttons .button a { display: inline-block; width: 100%; height: 100%; color: inherit }
.cn-buttons .bt-red { background-color: #DF3031; color: #FFF; border: 1px solid #DF3031 }
.cn-buttons .bt-white { background-color: #FFF; border: 1px solid #CCC }
.login-form { position: relative; display: block; margin: 180px 18px 30px; border-radius: 10px; box-shadow: 0 3px 5px #DDD; background: #FFF }
.login-form .it-text-list { background-image: none; }
.login-form .it-text-bottom { background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.5, transparent), color-stop(0.5, #E0E0E0), to(#E0E0E0)) }
.login-form .cartoon { position: absolute; top: -110px; left: 50%; margin-left: -77px; width: 155px; height: 110px; background: url("http://xfw8.sinaapp.com/webapp/static/mobile/image/cartoon-head.png") no-repeat center center; background-size: 155px; }
.login-form .cartoon .hand-left { position: absolute; left: -10px; bottom: -50px; width: 37px; height: 50px; background: url("http://xfw8.sinaapp.com/webapp/static/mobile/image/cartoon-hand-left.png") no-repeat center center; background-size: 37px; }
.login-form .cartoon .hand-right { position: absolute; right: -10px; bottom: -50px; width: 37px; height: 50px; background: url("http://xfw8.sinaapp.com/webapp/static/mobile/image/cartoon-hand-right.png") no-repeat center center; background-size: 37px; }
.login-form .cartoon .hand { position: absolute; z-index: 1; top: -10px; right: 0; width: 25px; height: 15px; background: #FCC4A9; border-radius: 100%; }
.login-form .cartoon .hand-right .hand { right: auto; left: 0; }

 

/*Javascript代码片段*/
$(".it-input input[type=password]").on("focus", function () {
        $(".hand").hide();
        $("#handLeft").animate({bottom: 0, left: 10});
        $("#handRight").animate({bottom: 0, right: 10});
    }).on("blur", function () {
        $("#handLeft").animate({bottom: -50, left: -10});
        $("#handRight").animate({bottom: -50, right: -10}, function () {
            $(".hand").show();
        });
    });

 

 

.

分享到:
评论

相关推荐

    webapp 页面交互与布局

    "Webapp页面交互与布局"是构建高效、用户友好的WebApp的核心要素,对于提升用户体验至关重要。 页面交互主要关注用户与网页的互动方式,包括点击、滑动、拖放、动画效果、表单填写、验证等。良好的交互设计能够使...

    前端经典——webApp登录校验及封装.rar

    前端经典——webApp登录校验及封装

    webapp框架

    在这个框架中,登录模块可能已经实现了基本的身份验证逻辑,如哈希和盐值加密密码,以及错误处理机制,如无效用户名或密码的提示。它也可能包含记住我功能,以及与后端服务器进行安全通信的API接口。 2. **主界面...

    C# Webapp C# WebappC# WebappC# Webapp

    C# Webapp的开发中,表示层主要负责用户交互,使用ASP.NET技术如ASP.NET MVC或ASP.NET Core来创建动态网页。业务逻辑层处理应用程序的核心功能,通过C#编写服务类实现业务规则。数据访问层则与数据库进行交互,例如...

    webapp初始动画页

    在这个项目中,jQuery可能用于触发动画、同步多个动画的执行,或者根据用户的交互(如点击、滚动)控制动画的播放与暂停。jQuery的`.animate()`方法可以轻松地创建自定义动画,而`.delay()`方法则可添加延迟,使得...

    QtWebApp应用例程

    QtWebApp集成qtservice,使得Web应用能够在后台稳定运行,不受用户登录注销的影响。 在QtWebApp的示例程序中,你可以找到各种实际应用的模板,比如如何设置路由、处理HTTP请求、构建WebSocket连接、使用模板引擎...

    Web基础——WebApp之初体验(三)

    在本篇关于“Web基础——WebApp之初体验(三)”的文章中,我们将深入探讨Web应用程序(WebApp)的关键概念和技术,以及它们如何为用户提供便捷的在线体验。WebApp是互联网技术的重要组成部分,它们允许用户在浏览器...

    cas-server-webapp-4.0.0单点登录(带超详细文档、数据连接jar包、c3p0)可运行

    单点登录 sso cas带超详细文档,包含(cas-server-webapp-4.0.0.war、c3p0-0.9.1.2.jar、cas-client-core-3.3.3.jar、cas-server-support-jdbc-4.0.0.jar、cas-server-webapp-support-4.0.0.jar、commons-logging-...

    cas-server-webapp-4.0.0实现单点登录

    单点登录(Single Sign-On,简称SSO)是一种网络用户身份验证的机制,它允许用户在一次登录后,就可以在多个应用系统中自由切换而无需再次登录。在本案例中,我们将探讨如何使用`cas-server-webapp-4.0.0`来实现单点...

    training/webapp镜像

    training/webapp镜像,方面一些内网用户无法直接pull镜像时下载: 使用方法: docker load -i training-webapp.tar.gz

    Webapp 微信骨架

    "动效可定制"是该框架的一大亮点,它支持自定义动画效果,让网页交互更加生动有趣,提升用户体验。同时,"动静两相宜"意味着无论是静态页面还是动态交互,Webapp 微信骨架都能处理得游刃有余,提供流畅的页面转换和...

    ssh webapp 先方方

    5. **安全最佳实践**:使用SSH时,应遵循一些安全规则,如定期更换SSH密钥,限制SSH端口,启用公钥认证并禁用密码登录,以及使用防火墙限制访问等。 6. **Web服务器配置**:SSH也可能涉及到Web服务器的配置,如...

    webapp代码

    【描述】"仿海底捞写的webapp完整H5webapp静态项目"意味着这个项目是一个模拟海底捞餐饮体验的Web应用程序,但它并不具备实际的数据交互功能。这意味着虽然页面设计和布局与实际的海底捞应用相似,但并未连接到真实...

    webapp开发综合案例

    1.了解Web工程概念及与传统软件工程的区别 2.理解WebApp的概念、特点和开发过程 3.掌握WebApp的分析、设计和测试方法 4.掌握WebApp综合开发方法及课程设计过程

    webApp学习

    在本项目"webApp学习"中,我们主要探讨如何利用HTML、JavaScript以及Canvas技术来创建交互式的图表,并实现载入动画效果。以下是对这些知识点的详细解析: 1. **HTML**:HTML(HyperText Markup Language)是网页的...

    webApp Demo

    这个"webApp Demo"对于初学者或者需要深入理解WebView和JavaScript交互的开发者来说,是非常有价值的参考资料。通过研究这个示例,开发者可以更好地掌握在Android应用中集成网页内容,提升应用的功能性和用户体验。

    webApp和壳的接口.docx

    《WebApp与Android壳交互接口详解》 在移动应用开发中,WebApp与原生APP的壳(Native Shell)之间的交互是至关重要的,尤其是在构建混合型应用时。本文将详细解析一个公司内部使用的WebApp与Android壳的接口协议,...

    汽车webapp html5源码

    在这个项目中,JavaScript可能用于处理用户交互、数据异步加载、页面路由管理等功能,可能引入了jQuery或Vue.js、React.js等JavaScript库或框架来简化开发。 4. **图片资源**:汽车WebAPP通常会包含大量的汽车图片...

    一个webapp

    7. **用户体验(UX)与交互设计**:良好的WebApp不仅要有漂亮的外观,还要提供优秀的用户体验。理解用户行为模式,设计直观的导航和交互流程,是提高用户满意度的关键。 8. **安全与性能**:在开发WebApp时,安全性...

Global site tag (gtag.js) - Google Analytics