vue按钮变形成表单动画切换效果代码
代码语言:html
所属分类:表单美化
代码描述:vue按钮变形成表单动画切换效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700,900" rel="stylesheet"> <style> @charset "UTF-8"; .container { background-image: linear-gradient(-128deg, rgba(255, 181, 32, 0.93) 3%, rgba(239, 39, 153, 0.93) 88%, rgba(237, 18, 171, 0.93) 100%); display: flex; width: 100%; height: 100%; justify-content: center; align-items: center; } .add-product { transition: all 0.3s ease; background-color: #FFC145; height: 144px; width: 144px; border-radius: 72px; box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.07); cursor: pointer; } .add-product.open { background-color: #FAFAFA; padding: 18px 32px; border-radius: 5px; width: 420px; height: 398px; cursor: default; } .add-product.open form { opacity: 1; transition: opacity 0.1s ease; transition-delay: 0.3s; height: auto; } .add-product .button-copy { text-align: center; line-height: 144px; text-transform: uppercase; font-weight: bold; color: #f7f7f7; } .add-product form { transition: none; opacity: 0; height: 0; overflow: hidden; } .add-product .cancel { font-size: 12px; text-align: center; margin-top: 1em; } .add-product .cancel span { cursor: pointer; } .add-product .cancel span:hover { text-decoration: underline; } .submit-button { display: block; background-color: #3498DB; height: 40px; border-radius: 20px; line-height: 36px; text-align: center; color: #fff; text-transform: uppercase; font-size: 0.875em; border: none; font-weight: 700; padding: 0 34px; margin: 0 auto; } .submit-button img { position: relative; top: 3px; right: 6px; } .submit-button:hover { background-color: #217dbb; cursor: pointer; } .featured-note { color: #949494; font-size: 12px; margin: 4px 0px; line-height: 18px; font-style: italic; } form * { outline: none; } label { display: block; font-size: 14px; font-weight: bold; user-select: none; } label.emoji input { -webkit-appearance: none; -moz-appearance: none; appearance: none; height: 21px; margin: 0; display: none; } label.emoji input + span:after { content: "😶"; font-size: 18px; top: 2px; left: 2px; position: relative; height: 18px; display: inline-block; } label.emoji input:checked + span:after { content: "😀"; } .form--field { width: 420px; margin: 10px 0; } .form--field.-short { width: 120px; } .form--price { position: absolute; line-height: 38px; width: 16px; color: #C7C7C7; text-align: center; } .form--price + input { padding-left: 14px; } .form--container { width: 420px; } .form--container.-inline { display: flex; flex-direction: row; justify-content: space-between; margin-bottom: -12px; } .form--element { background-color: #fff; border: 1px solid #ECECEC; border-radius: 3px; font-size: 14px; line-height: 28px; padding: 0 4px; color: #3D3D3D; width: 100%; margin: 4px 0; box-sizing: border-box; font-family: 'Open Sans', sans-serif; } .form--element:focus { border: 1px solid #FFC145; border-radius: 2px; } .form--element:not(.texteare) { height: 30px; } .form--element.textarea { height: 80px; resize: none; } html, body { height: 100%; margin: 0; } body { font-family: 'Open Sans', sans-serif; font-size: 16px; background-color: #F3F4F5; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0