css实现注册表单步骤效果代码
代码语言:html
所属分类:表单美化
代码描述:css实现注册表单步骤效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url(https://fonts.googleapis.com/css?family=Open+Sans:700,300); html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font: inherit; font-size: 100%; vertical-align: baseline; } html { line-height: 1; } ol, ul { list-style: none; } table { border-collapse: collapse; border-spacing: 0; } caption, th, td { text-align: left; font-weight: normal; vertical-align: middle; } q, blockquote { quotes: none; } q:before, q:after, blockquote:before, blockquote:after { content: ""; content: none; } a img { border: none; } article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } body { font-family: "Open Sans", sans-serif; font-size: 16px; text-align: center; color: #444; background: #d0d0d0; } header { margin-bottom: 2em; } h1 { font-size: 2em; margin: 2em 0 1em; } strong { font-weight: 700; } p { line-height: 1.4em; } article header { margin: 0; } .full-height { height: 26em; align-items: center; } .flexy-item { display: flex; flex-direction: row; justify-content: center; position: relative; } .flexy-column { flex-direction: column; } .flexy-column.reverse { flex-direction: column-reverse; } .flexy-item_child { flex: 1 0 100%; } .pure-steps { display: inline-block; width: 20em; color: white; margin-bottom: 3em; } .pure-steps strong { color: #B2FF41; font-weight: 300; } .pure-steps .pure-steps_group { position: relative; min-height: 26em; border-radius: .4em; overflow: hidden; box-shadow: 0 1.7em 5.5em -0.94em rgba(0, 0, 0, 0.3), 0 2em 3em 0.5em rgba(0, 0, 0, 0.1), 0 1.8em 2em -1.5em rgba(0, 0, 0, 0.2); background-image: linear-gradient(-120deg, #26e289 0%, #1a5fa2 100%, #ff0000 200%); background-position: 0 0; background-size: 300%; will-change: background, box-shadow; transition: all 0.3s ease-out; } .pure-steps .pure-steps_group .pure-steps_group-step { position: absolute; left: 0; top: 0; width: 100%; transform: translate(100%); opacity: 0; will-change: transform, opacity; transition: all 0.6s ease-in-out; text-align: left; } .pure-steps .pure-steps_group .pure-steps_group-step:last-child { text-align: center; } .pure-steps .pure-steps_group .pure-steps_group-step .pure-steps_group-step_legend { font-size: 1.5em; font-weight: 700; padding: 1.5em 1.34em 1em; line-height: 1em; position: relative; } .pure-steps .pure-steps_group .pure-steps_group-step .pure-steps_group-step_item { padding: 0 2em 1em; } .pure-steps .pure-steps_group .pure-steps_group-step .pure-steps_group-step_item label { font-size: .8em; display: block; opacity: .6; } .pure-steps .pure-steps_group .pure-steps_group-step .pure-steps_group-step_item input { font-size: 1em; box-sizing: border-box; width: 100%; border: 0; line-height: 1.5em; background-color: transparent; background-image: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, #e5e5e5 1px), linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, #b2ff41 1px); background-size: 100% 1px, 0% 1px; background-repeat: no-repeat; outline: none; will-change: background; transition: background 0.3s ease-in-out; color: white; font-family: "Open Sans", sans-serif; font-weight: 300; } .pure-steps .pure-steps_group .pure-steps_group-step .pure-steps_group-step_item input:focus { color: white; background-size: 0% 1px, 100% 1px; } .pure-steps .pure-steps_group .pure-steps_group-step .pure-steps_group-step_item input:focus + label { opacity: 1; color: #B2FF41; } .pure-steps .pure-steps_group .pure-steps_group-step .pure-steps_group-step_item input::-webkit-input-placeholder { color: rgba(255, 255, 255, 0.6); } .pure-steps .pure-steps_group .pure-steps_group-step .pure-steps_group-step_item input:-moz-placeholder { /* Firefox 18- */ color: rgba(255, 255, 255, 0.6); } .pure-steps .pure-steps_group .pure-steps_group-step .pure-steps_group-step_item input::-moz-placeholder { /* Firefox 19+ */ color: rgba(255, 255, 255, 0.6); } .pure-steps .pure-steps_group .pure-steps_group-step .pure-steps_group-step_item input:-ms-input-placeholder { color: rgba(255, 255, 255, 0.6); } .pure-steps .pure-steps_radio { display: none; } .pure-steps .pure-steps_group-triggers { position: absolute; left: 0; bottom: 0; width: 100%; height: 3.6em; border-radius: 0 0 .4em .4em; background-color: rgba(0, 0, 0, 0.1); will-change: opacity; transition: opacity 0.3s ease-in-out; } .pure-steps .pure-steps_group-triggers:before { content: ''; display: inline-block; position: absolute; left: 0; width: 0%; height: .1em; background: rgba(178, 255, 65, 0.4); will-change: width; transition: width 0.6s ease-in-out; } .pure-steps .pure-steps_group-triggers .pure-steps_group-triggers_item { display: none; } .pure-steps .pure-steps_group-triggers .pure-steps_group-triggers_item label { display: block; padding: 1.2em; color: white; } .pure-steps .pure-steps_radio:nth-child(1):checked ~ .pure-steps_group { background-position: 25% 0; } .pure-steps .pure-steps_radio:nth-child(1):checked ~ .pure-steps_group .pure-steps_group-triggers:before { width: 33.333%; } .pure-steps .pure-steps_radio:nth-child(1):checked ~ .pure-steps_group .pure-steps_group-triggers .pure-steps_group-triggers_item:nth-child(2) { display: block; } .pure-steps .pure-steps_radio:nth-child(1):checked ~ .pure-steps_group .pure-steps_group-step:nth-child(1) { opacity: 1; transform: translate(0); } .pure-steps .pure-steps_radio:nth-child(2):checked ~ .pure-steps_group { background-position: 50% 0; } .pure-steps .pure-steps_radio:nth-child(2):checked ~ .pure-steps_group .pure-steps_group-triggers:before { width: 66.666%; } .pure-steps .pure-steps_radio:nth-child(2):checked ~ .pure-steps_group .pure-steps_group-triggers .pure-steps_group-triggers_item:nth-child(3) { display: block; } .pure-steps .pure-steps_radio:nth-child(2):checked ~ .pure-steps_group .pure-steps_group-step:nth-child(2) { opacity: 1; transform: translate(0); } .pure-steps .pure-steps_radio:nth-child(3):checked ~ .pure-steps_group { background-position: 75% 0; } .pure-steps .pure-steps_radio:nth-child(3):checked ~ .pure-steps_group .pure-steps_group-triggers { opacity: 0; transition-delay: 0.6s; } .pure-steps .pure-steps_radio:nth-child(3):checked ~ .pure-steps_group .pure-steps_group-step { align-items: center; height: 100%; } .pure-steps .pure-steps_radio:nth-child(3):checked ~ .pure-steps_group .pure-steps_group-step .pure-steps_.........完整代码请登录后点击上方下载按钮下载查看
网友评论0