css实现一个响应式大气自适应登录页面代码
代码语言:html
所属分类:响应式
代码描述:css实现一个响应式大气自适应登录页面代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/normalize.5.0.css"> <style> @import url("https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap"); *, *:after, *:before { box-sizing: border-box; } body { font-family: "Open Sans", sans-serif; } .wrapper { width: 100vw; min-height: 100vh; background-color: #f7f6fb; background: linear-gradient(45deg, #8356c9, #FFF); padding: 30px 15px; display: flex; align-items: center; justify-content: center; } .login { width: 100%; max-width: 800px; background-color: #FFF; display: flex; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4); } .login .login-form { flex-grow: 1; flex-shrink: 0; flex-basis: auto; max-width: 50%; background-color: #fff; padding: 60px 45px; } @media only screen and (max-width: 767.98px) { .login .login-form { max-width: 100%; } } @media only screen and (max-width: 575.98px) { .login .login-form { padding: 40px 20px; } } .login .login-form .logo { text-decoration: none; color: #333; display: flex; align-items: center; margin-bottom: 30px; font-size: 1.4rem; } .login .login-form .logo .logo-img { margin-right: 5px; } .login .login-form .logo .logo-text { font-weight: bold; } .login .login-form .login-title { font-size: 1.4em; font-weight: 400; color: #767676; margin-bottom: 25px; } .login .login-form .social-buttons { display: flex; margin: 0 -7.5px; } @media only screen and (max-width: 575.98px) { .login .login-form .social-buttons { flex-direction: column; } } .login .login-form .social-buttons .social-button { flex: 1 0 calc(50% - 15px); display: flex; align-items: center; justify-content: center; border-radius: 5px; padding: 5px; color: #FFF; text-decoration: none; transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; margin: 0 7.5px; } @media only screen and (max-width: 575.98px) { .login .login-form .social-buttons .social-button { max-width: 100%; margin-bottom: 10px; } } .login .login-form .social-buttons .social-button:hover { transform: scale(1.1); box-shadow: 0 5px 25px -15px rgba(0, 0, 0, 0.5); } .login .login-form .social-buttons .social-button.facebook { background-color: #425e9e; } .login .login-form .social-buttons .social-button.xing { background-color: #245553; } .login .login-form .social-buttons .social-button .button-icon { margin-right: 5px; } .login .login-form .social-buttons .social-button .button-text { font-size: 0.9rem; } .login .login-form .or-separator { display: block; width: 100%; text-align: center; padding: 50px 0px; color: #727272; } .login .login-form .form-wrapper .input-wrapper:not(:last-child) { margin-bottom: 10px; } .login .login-form .form-wrapper .input-wrapper .label, .login .login-form .form-wrapper .input-wrapper .input { display: block; width: 100%; } .login .login-form .form-wrapper .input-wrapper .label { padding-bottom: 3px; font-size: 0.9rem; color: #666; } .login .login-form .form-wrapper .input-wrapper .input { padding: 10px; border: 0; border-bottom: 1px solid #8356c9; } .login .login-form .form-wrapper .actions-help { display: flex; justify-content: space-between; padding: 20px 0 30px; } @media only screen and (max-width: 575.98px) { .login .login-form .form-wrapper .actions-help { flex-direction: column; } } .login .login-form .form-wrapper .actions-help .check-wrapper { display: inline-flex; align-items: center; } @media only screen and (max-width: 575.98px) { .login .login-form .form-wrapper .actions-help .check-wrapper { margin-bottom: 15px; } } .login .login-form .form-wrapper .actions-help .check-wrapper .checkbox { margin-right: 5px; } .login .login-form .form-wrapper .actions-help .help-link { color: #333; text-decoration: none; transition: color 0.3s ease-in-out; } .login .login-form .form-wrapper .actions-help .help-link:hover { color: #8356c9; } .login .login-form .form-wrapper .actions .action { display: inline-block; padding: 10px 30px; border-radius: 5px; border: 1px solid #c7c7c7; color: #333; text-decoration: none; background-color: #fff; margin-bottom: 10px; transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; } .login .login-form .form-wrapper .actions .action:hover { t.........完整代码请登录后点击上方下载按钮下载查看
网友评论0