css实现自适应登录表单页面代码

代码语言:html

所属分类:表单美化

代码描述:css实现自适应登录表单页面代码

代码标签: css 自适应 登录 表单 页面

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style>
        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,dl,dt,dd,ol,nav ul,nav 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-size: 100%;
            font: inherit;
            vertical-align: baseline;
        }
        
        article, aside, details, figcaption, figure,footer, header, hgroup, menu, nav, section {
            display: block;
        }
        
        ol,ul {
            list-style: none;
            margin: 0px;
            padding: 0px;
        }
        
        blockquote,q {
            quotes: none;
        }
        
        blockquote:before,blockquote:after,q:before,q:after {
            content: '';
            content: none;
        }
        
        table {
            border-collapse: collapse;
            border-spacing: 0;
        }
        
        /* start editing from here */
        a {
            text-decoration: none;
        }
        
        .txt-rt {
            text-align: right;
        }
        
        /* text align right */
        .txt-lt {
            text-align: left;
        }
        
        /* text align left */
        .txt-center {
            text-align: center;
        }
        
        /* text align center */
        .float-rt {
            float: right;
        }
        
        /* float right */
        .float-lt {
            float: left;
        }
        
        /* float left */
        .clear {
            clear: both;
        }
        
        /* clear float */
        .pos-relative {
            position: relative;
        }
        
        /* Position Relative */
        .pos-absolute {
            position: absolute;
        }
        
        /* Position Absolute */
        .vertical-base {
            vertical-align: baseline;
        }
        
        /* vertical align baseline */
        .vertical-top {
            vertical-align: top;
        }
        
        /* vertical align top */
        nav.vertical ul li {
            display: block;
        }
        
        /* vertical menu */
        nav.horizontal ul li {
            display: inline-block;
        }
        
        /* horizontal menu */
        img {
            max-width: 100%;
        }
        
        /*end reset*/
        /****-----start-body----****/
        body {
            font-family: Verdana;
            background: url(//repo.bfw.wiki/bfwrepo/image/6309f36ec52d0.png) 0px 0px no-repeat;
            background-size: cover;
            height:100vh;
        }
        
        body a {
            transition: 0.1s all;
            -webkit-transition: 0.1s all;
            -moz-transition: 0.1s all;
            -o-transition: 0.1s all;
        }
        
        body h1 {
            color: #fff;
            text-align: center;
            padding: 1em 0;
            font-size: 3em;
            'Lobster', cursive;}
        
        .app-block {
            width: 28%;
            margin: 0 auto;
            text-align: center;
            padding: 3em 5em;
            height: 80%;
        }
        
        form {
            padding: 3% 3% 7% 3%;
            border-bottom: 1px solid #999;
        }
        
        /*-----*/
        .cube img {
            margin: 2em 0;
        }
        
        .app-block input[type="text"],.app-block input[type="password"] {
            width: 81.2%;
            padding: 1.25em 1em 1.25em 4em;
            color: #fff;
            font-size: 16px;
            outline: none;
            font-weight: 500;
            border: none;
            background: url("//repo.bfw.wiki/bfwrepo/icon/5df4a6cf498ab.png") no-repeat 14px 20px #1e1e1d;
            margin: 0.8em 0;
        }
        
        .app-block input[type="password"] {
            background: url("//repo.bfw.wiki/bfwrepo/icon/5df4a6dc04f4f.png") no-repeat 13px 20px #1e1e1d;
        }
        
        .submit {
            margin: 1em 0;
        }
        
        .app-block p.sign {
            padding-top: 3em;
        }
        
        .app-block input[type="submit"] {
            font-size: 20px;
            font-weight: 300;
            color: #fff;
            cursor: pointer;
            outline: none;
            padding: 20px 20px;
            width: 100%;
            border: none;
            moz-transition: all 0.3s;
            -o-transition: all 0.3s;
            -webkit-transition: all 0.3s;
            transition: all 0.3s;
            background: #eacb20;
            border-radius: 2em;
            -webkit-border-radius: 2em;
            -o-border-radius: 2em;
            -moz-border-radius: 2em;
            border: 3px solid #EACB20
        }
        
        input[type="submit"]:hover {
            color: #EACB20;
            background: none;
            border: 3px dotted #EACB20;
        }
        
        .app-block p a,.app-block p.sign {
             color: white;
            font-weight: 400;
            font-size: 1em;
        }
        
        .app-block p {
            padding-top: 1em;
        }
        
        .app-block p a:hover,.app-block p.sign a:hover {
            text-decoration: underline;
             color: white;
        }
        
        /*---------------*/
        .copy-right {
            padding: 3em 1em;
        }
        
        .copy-right p {
            color: #fff;
            font-size: 1em;
            font-weight: 400;
            margin: 0 auto;
            text-align: center;
        }
        
        .copy-right p a {
            color: white;
        }
        
        .copy-right p a:hover {
            text-decoration: underline;
        }
        
        /*-----start-responsive-design------*/
        @media (max-width: 1440px) {
            .app-block {
                width:30%;
            }
        
            .app-block input[type="text"],.app-block input[type="password"] {
                width: 80.2%;
            }
        }
        
        @media (max-width: 1366px) {
            .app-block {
                width: 30%;
            }
        
            .app-block input[type="text"], .app-block input[t.........完整代码请登录后点击上方下载按钮下载查看

网友评论0