采用CSS3设计的登录界面,动态效果(动画)

摘要:
padding:url('./6.jpg')不重复;}#loginForm{height:absolute;margin:border:}10%{transform:}100%{transform:left:}}#loginTitle{height:字体系列:字体粗细:粗体;文本对齐:居中;颜色:白色;位置:

与上一篇的“采用CSS3设计的登陆界面”的相同,只是样式style添加了CSS3的动画元素。

style内容如下:

采用CSS3设计的登录界面,动态效果(动画)第1张采用CSS3设计的登录界面,动态效果(动画)第2张
<style>
            html,body,div{
                margin:0;
                padding:0;
                font-size:100%;
            }
            html{
                //background:url('./6.jpg') no-repeat;
                //background-size:cover;
                background:#45b97c;
                animation:bganimation 5s;
            }
            #loginForm{
                height:200px;
                width:350px;
                position:absolute;
                top:50%;
                left:50%;
                margin:-100px 0 0 -175px;
                box-shadow:0px 0px 25px 12px #c0c0c0;
                border:6px solid;
                border-color:#c0c0c0;
                border-radius:12px;
                animation:loginanimation 5s;
            }
            @keyframes bganimation{
                0% {background:#deab8a;}
                10% {background:#f7acbc;}
                20%{background:#987165;}
                30%{background:#e0861a;}
                40%{background:#00ae9d;}
                50%{background:#008792;}
                60%{background:#7f7522;}
                70%{background:#f173ac;}
                80%{background:#7c8577;}
                90%{background:#6950a1;}
                100%{background:#45b97c;}
            }
            @keyframes loginanimation{
                0% {transform:scale3d(0,0,0);top:50%;left:50%;}
                10% {transform:scale3d(0.1,0.1,0.1);top:25%;left:50%;}
                20%{transform:scale3d(0.2,0.2,0.2);top:25%;left:75%;}
                30%{transform:scale3d(0.3,0.3,0.3);top:50%;left:75%;}
                40%{transform:scale3d(0.4,0.4,0.4);top:75%;left:75%;}
                50%{transform:scale3d(0.5,0.5,0.5);top:75%;left:50%;}
                60%{transform:scale3d(0.6,0.6,0.6);top:75%;left:25%;}
                70%{transform:scale3d(0.7,0.7,0.7);top:50%;left:25%;}
                80%{transform:scale3d(0.8,0.8,0.8);top:25%;left:25%;}
                90%{transform:scale3d(0.9,0.9,0.9);top:25%;left:50%;}
                100%{transform:scale3d(1,1,1);top:50%;left:50%;}
            }
            #loginTitle{
                height:50px;
                width:100%;
                font-family:blazed,Kunstler Script"New York",Georgia;
                font-weight:bold;
                font-style:oblique;
                font-size:2em;
                text-align:center;
                line-height:50px;
                //-webkit-text-stroke:10px black;
                color:white;
                text-shadow:1px 1px 0 rgba(107,223,248,0.8),2px 2px 0 rgba(107,223,248,0.8),3px 3px 0 rgba(107,223,248,0.8),4px 4px 0 rgba(107,223,248,0.8),5px 5px 0 rgba(107,223,248,0.8);
            }
            #loginContent{
                height:110px;
                width:100%;
                position:relative;
            }
            #loginButton{
                height:40px;
                width:100%;
            }
            #register{
                height:40px;
                width:175px;
                float:left;
            }
            #login{
                height:40px;
                width:175px;
                float:left;
            }
            #register_button{
                height:40px;
                width:175px;
                background:none;
                border-radius:6px;
                border:1px solid;
                border-color:#808080;
                box-shadow:0px 0px 10px 0px #c0c0c0 inset;
                font-weight:bold;
            }
            #login_button{
                height:40px;
                width:175px;
                background:none;
                border-radius:6px;
                border:1px solid;
                border-color:#808080;
                box-shadow:0px 0px 10px 0px #c0c0c0 inset;
                font-weight:bold;
            }
            #user_info{
                position:absolute;
                height:80px;
                width:250px;
                left:75px;
                top:0px;
            }
            #user_help{
                position:absolute;
                height:30px;
                width:230px;
                left:60px;
                top:80px;
            }
            label{
                font-weight:bold;
                width:20px;
            }
            #user_info input{
                background:none;
                width:175px;
            }
            input[type=checkbox]{
                vertical-align:middle;
                margin-top:0;
            }
            #user_help input,#user_help label,#user_help a{
                line-height:30px;
                font-size:12px;
            }
            img{
                height:20px;
                width:20px;
                display:block;
                float:left;
            }
            #user_info label{
                display:block;
            }
</style>
View Code

实现效果如下,背景颜色类似微软win8及以上版本的颜色渐变效果,登陆窗口随位置的移动而不断变大到最终静止效果(以下仅例举3副效果图):

采用CSS3设计的登录界面,动态效果(动画)第3张

采用CSS3设计的登录界面,动态效果(动画)第4张

采用CSS3设计的登录界面,动态效果(动画)第5张

如有不足,请多多指教哈~~~大笑

更多知识分享:微笑空间站

免责声明:文章转载自《采用CSS3设计的登录界面,动态效果(动画)》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇linux系统数据落盘之细节php查看进程下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

html中删除表格的一行(有弹窗)

html中删除表格一行其实很简单,但是加上一个提示弹窗后,点击确定后却获取不到要删除的是哪一行,下面是一个demo html: <tr> <td> <input type="checkbox" /> </td> <td>安...

jQuery的过滤器总结

1、内容过滤器 $(function () { // $("a:contains('标签')").css("color","green") // $("div:empty").css() //不能包含文本和标签 $("div:hidden").length //...

chrome插件研发手册

chrome插件研发手册 一:需求前景                 对于研发的小伙伴来说,总会遇到这样的需求,想要通过代码操作已有网站的行为动作,如:自动填充表格内容(表单内容太多,想一键将表单内容填充);自动登录网站(网站登录密码老是忘记,或者用户名密码太长,想一键登录)……;对于这些需求都可以通过浏览器插件的方式解决,我们这里就以chrome插件来...

HBuilder ,及自用主题

字体:Consolas http://bbs.csdn.net/topics/390858585   让代码更美:你最爱的编程字体 http://www.dcloud.io     HBuilder下载 http://ask.dcloud.net.cn/docs  文档 http://www.dcloud.io/readme/#title12    nat...

width:100%和width:inherit

前几天遇到过这么一个问题。我想让子盒子的宽度等于父盒子的宽度。父盒子宽度为一个具体值比如说200px.我将子盒子宽度设为了100%。按道理说应该是可以等于父盒子的宽度的,但结果并没有,而是通栏了。然后我又将子盒子宽度设为了inherit。结果宽度就是父盒子的宽度了。 HTML结构如下: <body> <div cl...

Android—简单的仿QQ聊天界面

最近仿照QQ聊天做了一个类似界面,先看下界面组成(画面不太美凑合凑合呗,,,,):     其中聊天背景可以是一个LinearLayout或者RelativeLayout里面存放的是ListView(将ListView的分割线设置成透明:android:divider="#0000"否则聊天界面会显示出分割线,,,想想都屌,,,)    于是,我要上主界...