发送信件动画效果
代码语言:html
所属分类:动画
代码描述:发送信件动画效果
代码标签: 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> @import url(https://fonts.googleapis.com/css?family=Open+Sans:600); .frame { position: absolute; top: 50%; left: 50%; width: 400px; height: 400px; margin-top: -200px; margin-left: -200px; border-radius: 2px; box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.3); background: #2c3e50; font-family: 'Open Sans', Helvetica, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow: hidden; } .circle, .circle-outer { position: absolute; width: 200px; height: 200px; top: 65px; left: 100px; background: #354A5F; border-radius: 50%; } .circle-outer { box-sizing: border-box; background: none; border: 4px solid #354A5F; } .icon { position: absolute; z-index: 2; top: 130px; left: 140px; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); fill: none; stroke-width: 2px; stroke: #ecf0f1; stroke-linecap: square; stroke-dasharray: 325 325; } .icon.mail { width: 120px; height: 70px; stroke-dashoffset: 0; } .icon.plane { width: 120px; height: 110px; stroke-dashoffset: 325; } #cb { display: none; } .button { position: absolute; z-index: 10; width: 200px; height: 40px; top: 290px; left: 100px; background: #ecf0f1; color: #2c3e50; text-align: center; line-height: 40px; border-radius: 20px; font-weight: 600; text-transform: uppercase; font-size: 15px; cursor: pointer; } .button.reset { opacity: 0; z-index: 5; } .button:hover { background: #1abc9c; color: #fff; } #cb:checked ~ .button { -webkit-animation: button 1.5s ease-in-out 1.7s; animation: button 1.5s ease-in-out 1.7s; -webkit-animation-fill-mode: both; animation-fill-mode: both; } #cb:checked ~ .reset { -webkit-animation: reset 1s ease-in-out 3.7s; animation: reset 1s ease-in-out 3.7s; -webkit-animation-fill-mode: both; animation-fill-mode: both; } #cb:checked ~ .circle, #cb:checked ~ .circle-outer { -webkit-animation: circle 1s ease-in-out; animation: circle 1s ease-in-out; -webkit-animation-fill-mode: both; animation-fill-mode: both; } #cb:checked ~ .circle-outer { -webkit-animation: circle .8s ease-in-out .2s; animation: circle .8s ease-in-out .2s; -webkit-animation-fill-mode: both; animation-fill-mode: both; } #cb:checked ~ .mail { stroke-dashoffset: 326; -webkit-transition: stroke-dashoffset 1s ease-in-out; transition: stroke-dashoffset 1s ease-in-out; } #cb:checked ~ .plane { stroke-dashoffset: 0; -webkit-transition: stroke-dashoffset 1s ease-in-out .6s; transition: stroke-dashoffset 1s ease-in-out .6s; -webkit-animation: fly 2.4s ease-in-out; animation: fly 2.4s ease-in-out; -webkit-animation-fill-mode: both; animation-fill-mode: both; } @-webkit-keyframes fly { 0%, 50% { -webkit-transform: translate3d(0, 0, 0) scale(1); transform: translate3d(0, 0, 0) scale(1); } 60% { -webkit-transform: translate3d(-10px, 5px, 0) scale(1.05); transform: translate3d(-10px, 5px, 0) scale(1.05); } 70% { opacity: 1; } 85% { opacity: 0; } 100% { -webkit-transform: translate3d(300px, -.........完整代码请登录后点击上方下载按钮下载查看
网友评论0