css实现一个自适应简约的登录注册页面效果代码
代码语言:html
所属分类:表单美化
代码描述:css实现一个自适应简约的登录注册页面效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" class="no-js"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/normalize.min.css"> <style> .selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder { visibility: visible !important; background: #f2f2f2 !important; background: rgba(0, 0, 0, 0.06) !important; border: 0 none !important; -webkit-box-shadow: inset 0 0 12px 4px #ffffff; box-shadow: inset 0 0 12px 4px #ffffff; } .selectize-control.plugin-drag_drop .ui-sortable-placeholder::after { content: '!'; visibility: hidden; } .selectize-control.plugin-drag_drop .ui-sortable-helper { -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); } .selectize-dropdown-header { position: relative; padding: 3px 12px; border-bottom: 1px solid #d0d0d0; background: #f8f8f8; -webkit-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; } .selectize-dropdown-header-close { position: absolute; right: 12px; top: 50%; color: #333333; opacity: 0.4; margin-top: -12px; line-height: 20px; font-size: 20px !important; } .selectize-dropdown-header-close:hover { color: #000000; } .selectize-dropdown.plugin-optgroup_columns .optgroup { border-right: 1px solid #f2f2f2; border-top: 0 none; float: left; -webkit-box-sizing: border-box; box-sizing: border-box; } .selectize-dropdown.plugin-optgroup_columns .optgroup:last-child { border-right: 0 none; } .selectize-dropdown.plugin-optgroup_columns .optgroup:before { display: none; } .selectize-dropdown.plugin-optgroup_columns .optgroup-header { border-top: 0 none; } .selectize-control.plugin-remove_button [data-value] { position: relative; padding-right: 24px !important; } .selectize-control.plugin-remove_button [data-value] .remove { z-index: 1; /* fixes ie bug (see #392) */ position: absolute; top: 0; right: 0; bottom: 0; width: 17px; text-align: center; font-weight: bold; font-size: 12px; color: inherit; text-decoration: none; vertical-align: middle; display: inline-block; padding: 1px 0 0 0; border-left: 1px solid transparent; -webkit-border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0; -webkit-box-sizing: border-box; box-sizing: border-box; } .selectize-control.plugin-remove_button [data-value] .remove:hover { background: rgba(0, 0, 0, 0.05); } .selectize-control.plugin-remove_button [data-value].active .remove { border-left-color: transparent; } .selectize-control.plugin-remove_button .disabled [data-value] .remove:hover { background: none; } .selectize-control.plugin-remove_button .disabled [data-value] .remove { border-left-color: rgba(77, 77, 77, 0); } .selectize-control.plugin-remove_button .remove-single { position: absolute; right: 28px; top: 6px; font-size: 23px; } .selectize-control { position: relative; } .selectize-dropdown, .selectize-input, .selectize-input input { color: #333333; font-family: inherit; font-size: inherit; line-height: 20px; -webkit-font-smoothing: inherit; } .selectize-input, .selectize-control.single .selectize-input.input-active { background: #ffffff; cursor: text; display: inline-block; } .selectize-input { border: 1px solid rgba(150, 153, 160, 0.5); padding: 6px 12px; display: inline-block; width: 100%; overflow: hidden; position: relative; z-index: 1; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-box-shadow: none; box-shadow: none; -webkit-border-radius: 4px; border-radius: 4px; } ._error .selectize-input, .selectize-input._error { color: #ec3d49; border-color: #ec3d49; } .selectize-control.multi .selectize-input.has-items { padding: 5px 12px 2px; } .selectize-input.full { background-color: #ffffff; } .selectize-input.disabled, .selectize-input.disabled * { cursor: default !important; } .selectize-input.focus { -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); } .selectize-input.dropdown-active { -webkit-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; } .selectize-input > * { vertical-align: baseline; display: -moz-inline-stack; display: inline-block; zoom: 1; *display: inline; } .selectize-control.multi .selectize-input > div { cursor: pointer; margin: 0 3px 3px 0; padding: 1px 3px; background: #efefef; color: #333333; border: 0 solid transparent; } .selectize-control.multi .selectize-input > div.active { background: #428bca; color: #ffffff; border: 0 solid transparent; } .selectize-control.multi .selectize-input.disabled > div, .selectize-control.multi .selectize-input.disabled > div.active { color: #808080; background: #ffffff; border: 0 solid rgba(77, 77, 77, 0); } .selectize-input > input { display: inline-block !important; padding: 0 !important; min-height: 0 !important; max-height: none !important; max-width: 100% !important; margin: 0 !important; text-indent: 0 !important; border: 0 none !important; background: none !important; line-height: inherit !important; -webkit-user-select: auto !important; -webkit-box-shadow: none !important; box-shadow: none !important; } .selectize-input > input::-ms-clear { display: none; } .selectize-input > input:focus { outline: none !important; } .selectize-input::after { content: ' '; display: block; clear: left; } .selectize-input.dropdown-active::before { content: ' '; display: block; position: absolute; background: #ffffff; height: 1px; bottom: 0; left: 0; right: 0; } .selectize-dropdown { position: absolute; z-index: 10; border: 1px solid #d0d0d0; background: #ffffff; margin: -1px 0 0 0; border-top: 0 none; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -webkit-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; } .selectize-dropdown [data-selectable] { cursor: pointer; overflow: hidden; } .selectize-dropdown [data-selectable] .highlight { background: rgba(255, 237, 40, 0.4); -webkit-border-radius: 1px; border-radius: 1px; } .selectize-dropdown [data-selectable], .selectize-dropdown .optgroup-header { padding: 3px 12px; } .selectize-dropdown .optgroup:first-child .optgroup-header { border-top: 0 none; } .selectize-dropdown .optgroup-header { color: #777777; background: #ffffff; cursor: default; } .selectize-dropdown .active { background-color: #f5f5f5; color: #262626; } .selectize-dropdown .active.create { color: #262626; } .selectize-dropdown .create { color: rgba(51, 51, 51, 0.5); } .selectize-dropdown-content { overflow-y: auto; overflow-x: hidden; max-height: 200px; -webkit-overflow-scrolling: touch; } .selectize-control.single .selectize-input, .selectize-control.single .selectize-input input { cursor: pointer; } .selectize-control.single .selectize-input.input-active, .selectize-control.single .selectize-input.input-active input { cursor: text; } .selectize-control.single .selectize-input:after { content: ' '; display: block; position: absolute; top: 50%; right: 17px; margin-top: -3px; width: 0; height: 0; border-style: solid; border-width: 5px 5px 0 5px; border-color: #333333 transparent transparent transparent; } .selectize-control.single .selectize-input.dropdown-active:after { margin-top: -4px; border-width: 0 5px 5px 5px; border-color: transparent transparent #333333 transparent; } .selectize-control.rtl.single .selectize-input:after { left: 17px; right: auto; } .selectize-control.rtl .selectize-input > input { margin: 0 4px 0 -2px !important; } .selectize-control .selectize-input.disabled { opacity: 0.5; background-color: #ffffff; } .selectize-dropdown, .selectize-dropdown.form-control { height: auto; padding: 0; margin: 2px 0 0 0; z-index: 1000; background: #ffffff; border: 1px solid #cccccc; border: 1px solid rgba(0, 0, 0, 0.15); -webkit-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); } .selectize-dropdown .optgroup-header { font-size: 12px; line-height: 1.42857143; } .selectize-dropdown .optgroup:first-child:before { display: none; } .selectize-dropdown .optgroup:before { content: ' '; display: block; height: 1px; margin: 9px 0; overflow: hidden; background-color: #e5e5e5; margin-left: -12px; margin-right: -12px; } .selectize-dropdown-content { padding: 5px 0; } .selectize-dropdown-header { padding: 6px 12px; } .selectize-input { min-height: 34px; } .selectize-input.dropdown-active { -webkit-border-radius: 4px; border-radius: 4px; } .selectize-input.dropdown-active::before { display: none; } .selectize-input.focus { border-color: #66afe9; outline: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); } .has-error .selectize-input { border-color: #a94442; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .has-error .selectize-input:focus { border-color: #843534; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; } .selectize-control.multi .selectize-input.has-items { padding-left: 9px; padding-right: 9px; } .selectize-control.multi .selectize-input > div { -webkit-border-radius: 3px; border-radius: 3px; } .form-control.selectize-control { padding: 0; height: auto; border: none; background: none; -webkit-box-shadow: none; box-shadow: none; -webkit-border-radius: 0; border-radius: 0; } .animation-base, .animate { -webkit-animation-duration: .4s; animation-duration: .4s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .animate { visibility: hidden; } ._animated { visibility: visible; } .fadeIn, .fadeInUp { opacity: 0; } .fadeIn { -webkit-animation-name: fadeIn; animation-name: fadeIn; } .fadeInUp { -webkit-animation-name: fadeInUp; animation-name: fadeInUp; } @-webkit-keyframes cheDown { from { -webkit-transform: translateY(0); transform: translateY(0); opacity: 1; } 85% { -webkit-transform: translateY(100%); transform: translateY(100%); opacity: 0; } 86% { -webkit-transform: translateY(0); transform: translateY(0); opacity: 0; } to {} } @keyframes cheDown { from { -webkit-transform: translateY(0); transform: translateY(0); opacity: 1; } 85% { -webkit-transform: translateY(100%); transform: translateY(100%); opacity: 0; } 86% { -webkit-transform: translateY(0); transform: translateY(0); opacity: 0; } to {} } @-webkit-keyframes cheUp { from { -webkit-transform: translateY(0); transform: translateY(0); opacity: 1; } 85% { -webkit-transform: translateY(-100%); transform: translateY(-100%); opacity: 0; } 86% { -webkit-transform: translateY(0); transform: translateY(0); opacity: 0; } to {} } @keyframes cheUp { from { -webkit-transform: translateY(0); transform: translateY(0); opacity: 1; } 85% { -webkit-transform: translateY(-100%); transform: translateY(-100%); opacity: 0; } 86% { -webkit-transform: translateY(0); transform: translateY(0); opacity: 0; } to {} } @-webkit-keyframes sliderOpen { from { opacity: 0; -webkit-transform: translateX(100%) translateZ(0); transform: translateX(100%) translateZ(0); } to { opacity: 1; -webkit-transform: translateX(0) translateZ(0); transform: translateX(0) translateZ(0); } } @keyframes sliderOpen { from { opacity: 0; -webkit-transform: translateX(100%) translateZ(0); transform: translateX(100%) translateZ(0); } to { opacity: 1; -webkit-transform: translateX(0) translateZ(0); transform: translateX(0) translateZ(0); } } @-webkit-keyframes fadeOut { to { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } } @-webkit-keyframes fadeIn { to { opacity: 1; } } @keyframes fadeIn { to { opacity: 1; } } @-webkit-keyframes fadeInUp { from { opacity: 0; -webkit-transform: translateY(50%); transform: translateY(50%); } to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); } } @keyframes fadeInUp { from { opacity: 0; -webkit-transform: translateY(50%); transform: translateY(50%); } to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); } } @-webkit-keyframes scaleOut { to { -webkit-transform: scale(0); transform: scale(0); } } @keyframes scaleOut { to { -webkit-transform: scale(0); transform: scale(0); } } @-webkit-keyframes scaleIn { to { -webkit-transform: scale(1); transform: scale(1); } } @keyframes scaleIn { to { -webkit-transform: scale(1); transform: scale(1); } } @-webkit-keyframes slideIn { from { opacity: 1; } to { opacity: 1; -webkit-transform: translateX(0) translateZ(0); transform: translateX(0) translateZ(0); } } @keyframes slideIn { from { opacity: 1; } to { opacity: 1; -webkit-transform: translateX(0) translateZ(0); transform: translateX(0) translateZ(0); } } .bg-gray { background-color: #F5F6FA; } .bg-acc { background-color: #3C4CAC; } .bg-blue { background-color: #132667; } .bg-gradient { background-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIzMzQwIDAgMTYwMCA5MDAiPjxkZWZzPjxzdHlsZT4uYXtmaWxsOnVybCgjYSl9PC9zdHlsZT48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSItLjQ2NSIgeTE9Ii0uNTMxIiB4Mj0iMS44NyIgeTI9IjEuNjg0IiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjM2M0Y2FjIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMGExMDIwIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHBhdGggY2xhc3M9ImEiIGQ9Ik0zMzQwIDBoMTYwMHY5MDBIMzM0MHoiLz48L3N2Zz4="); -webkit-background-size: cover; background-size: cover; background-attachment: fixed; } .bg-dark { background-color: rgba(0, 0, 0, 0.15); } .bg-image { background-position: top center; -webkit-background-size: cover; background-size: cover; position: relative; } .bg-image--fill { position: absolute; opacity: .1; top: 0; left: 0; width: 100%; height: 100%; } .bg-image--gray { -webkit-filter: grayscale(100%); filter: grayscale(100%); } /* Buttons style */ .button { display: inline-block; position: relative; text-align: center; cursor: pointer; -webkit-border-radius: 100px; border-radius: 100px; } .button--gradient { color: #fff; font-size: 14px; font-weight: 600; height: 50px; width: 190px; overflow: hidden; -webkit-box-shadow: 0 20px 30px 0 rgba(0, 0, 0, 0.16); box-shadow: 0 20px 30px 0 rgba(0, 0, 0, 0.16); -webkit-transition: -webkit-box-shadow .2s ease-in-out; transition: -webkit-box-shadow .2s ease-in-out; -o-transition: box-shadow .2s ease-in-out; transition: box-shadow .2s ease-in-out; transition: box-shadow .2s ease-in-out, -webkit-box-shadow .2s ease-in-out; line-height: 50px; } .button--gradient:before, .button--gradient:after { content: ''; position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; -webkit-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .button--gradient:before { background: -webkit-linear-gradient(315deg, #ec3d49 0%, #f3943c 100%); background: -o-linear-gradient(315deg, #ec3d49 0%, #f3943c 100%); background: linear-gradient(135deg, #ec3d49 0%, #f3943c 100%); } .button--gradient:after { background: -webkit-linear-gradient(285deg, #ec3d49 0%, #f3943c 100%); background: -o-linear-gradient(285deg, #ec3d49 0%, #f3943c 100%); background: linear-gradient(165deg, #ec3d49 0%, #f3943c 100%); -webkit-transition: opacity .2s ease-in-out; -o-transition: opacity .2s ease-in-out; transition: opacity .2s ease-in-out; opacity: 0; will-change: opacity; } [data-touching="true"] .button--gradient { -webkit-border-radius: 100px; border-radius: 100px; } [data-touching="false"] .button--gradient:hover { -webkit-box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.32); box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.32); } [data-touching="false"] .button--gradient:hover:after { opacity: 1; } .button--border { border: 2px solid #3C4CAC; color: #3C4CAC; font-size: 13px; font-weight: bold; height: 35px; line-height: 30px; width: 100px; -webkit-transition: opacity .2s ease-in-out; -o-transition: opacity .2s ease-in-out; transition: opacity .2s ease-in-out; } [data-touching="false"] .button--border:hover { opacity: .7; } .button__text { position: relative; z-index: 2; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } button.button { line-height: 1; } .login-box-wrapper { min-height: 100vh; text-align: center; } .login-box-wrapper:after { content: ''; display: inline-block; vertical-align: middle; height: -webkit-calc(100vh - 180px); height: calc(100vh - 180px); width: 0; } .login-box { display: inline-block; vertical-align: middle; max-width: 540px; width: -webkit-calc(100% - 40px); width: calc(100% - 40px); text-align: left; } .login-box__title { color: #fff; font-size: 36px; font-weight: normal; margin-bottom: 15px; } .login-box__form { background-color: #fff; padding: 60px 70px; } .login-box__footer-link { display: block; margin-top: 35px; color: #fff; -webkit-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; text-align: center; } .login-box__footer-link span { color: #4fc3f7; } .login-box__footer-link:hover { color: #4fc3f7; } .form { position: relative; } .form__error { background-color: #ec3d49; color: #fff; padding-left: 70px; padding-right: 70px; padding-top: 10px; padding-bottom: 10px; width: 100%; } .form__error p:not(:last-child) { margin-bottop: 10px; } .form__field { position: relative; margin-bottom: 20px; display: block; } .form__field--flag { margin-top: 35px; } .form__input, .form__textarea { width: 100%; font-size: 14px; font-weight: 600; padding-left: 15px; padding-right: 15px; color: #192038; border: 1px solid rgba(150, 153, 160, 0.5); -webkit-border-radius: 4px; border-radius: 4px; text-align: left; -webkit-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } ._error .form__input, ._error .form__textarea { color: #ec3d49; border-color: #ec3d49; } .form__input { height: 34px; } .form.........完整代码请登录后点击上方下载按钮下载查看
网友评论0