div+css实现表单提交飞出动画效果代码
代码语言:html
所属分类:表单美化
代码描述:div+css实现表单提交飞出动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css?family=Bree+Serif|Lato"); * { box-sizing: border-box; } html, body { margin: 0; padding: 0; box-sizing: border-box; } body { background-color: #f9fbe7; font-family: "Lato", sans-serif; overflow: hidden; } .title { color: #9e9d24; font-size: 1em; margin: 1em; } .remo { position: absolute; top: 50%; left: 50%; transition: 0.3s ease; transform: translate(-50%, -1500%); } .send-card { min-width: 300px; padding: 1em; background: #f0f4c3; box-shadow: 0px 0px 10px #c0ca33; border-radius: 5px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); perspective: 800px; transform-style: preserve-3d; transition: 0.3s ease; transform-origin: center; } .send-card__title { font-size: 1.2em; font-family: "Bree Serif", serif; color: #827717; } .send-card .input { display: block; width: 100%; padding: 0.5em; margin-bottom: 1em; font-size: 1.2em; border: none; border-bottom: 2px solid #afb42b; transition: 0.3s ease; } .send-card .input::placeholder { color: #9e9d24; } .send-card .input:focus::placeholder { transition: 0.3s ease; letter-spacing: 5px; } .send-card__button, .remo { display: block; margin: 0 auto; background: #afb42b; color: #fff; cursor: pointer; border: 1px solid #e6ee9c; text-transform: uppercase; font-family: "Bree Serif", serif; font-size: 1.2em; padding: 0.2em 1.5em 0.3em; margin-bottom: 1em; border-radius: 5px; transform-style: preserve-3d; } .send-card__button:hover, .remo:hover { transition: 0.3s ease; background: #9e9d24; } .btn-anim { animation: btn 0.3s ease forwards, btn-rotate 0.25s linear 0.3s infinite; } .card-anim { animation: flyout 1s ease 0.3s forwards; } .rem-anim { animation: rem 0.5s ease 1.3s forwards; } @keyframes btn { 0% { transform: scale(1); } 70% { transform: scale(4, 1) translate(0, -40px); } 100% { transform: scale(2.5, 1) translate(0, -240px); } } @keyframes btn-rotate { 0% { transform: scale(2.5, 1) translate(0, -240px) rotate3d(0, 0, 0, 0deg); } 100% { transform: scale(2.5, 1) translate(0, -240px) rotate3d(0, 1, 1, 360deg); } } @keyframes flyout { 0% { transform: tran.........完整代码请登录后点击上方下载按钮下载查看
网友评论0