css自定义一个橙色主题表单各个组件美化效果代码

代码语言:html

所属分类:表单美化

代码描述:css自定义一个橙色主题表单各个组件美化效果代码

代码标签: css 表单 美化

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

<!DOCTYPE html>
<html>

<head>


   
<meta charset="utf-8">
   
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">

   
<style>
        html, body {
        margin: 0;
        padding: 0;
        background-attachment: fixed;
        background-position: 50% 50%;
        background-size: cover;
    }
    a {
        text-decoration: underline;
    }
    a:hover {
        text-decoration: none;
    }
   
    .body {
        max-width: 600px;
        margin: 0 auto;
        padding: 40px;
        box-sizing: content-box;
        -moz-box-sizing: content-box;
    }
    .body-s {
        max-width: 400px;
    }
    .modal {
        padding: 25px 30px;
        background: rgba(255,255,255,0.9);
        font: 13px/1.55 'Open Sans', Helvetica, Arial, sans-serif;
        color: #666;
    }
    .modal a {
        color: #2da5da;
    }
   
    @media screen and (max-width: 600px) {
        .body {
                padding: 20px;
        }
    }
   
    /**/
    /* font */
    /**/
    @import url(css.css);
   
   
    /**/
    /* defaults */
    /**/
    .sky-form {
        margin: 0;
        outline: none;
        box-shadow: 0 0 20px rgba(0,0,0,.3);
        font: 13px/1.55 'Open Sans', Helvetica, Arial, sans-serif;
        color: #666;
    }
    .sky-form header {
        display: block;
        padding: 20px 30px;    
        border-bottom: 1px solid rgba(0,0,0,.1);
        background: rgba(248,248,248,.9);
        font-size: 25px;
        font-weight: 300;
        color: #232323;
    }
    .sky-form fieldset {
        display: block;
        padding: 25px 30px 5px;
        border: none;
        background: rgba(255,255,255,.9);
    }
    .sky-form fieldset + fieldset {
        border-top: 1px solid rgba(0,0,0,.1);
    }
    .sky-form section {
        margin-bottom: 20px;
    }
    .sky-form footer {
        display: block;
        padding: 15px 30px 25px;
        border-top: 1px solid rgba(0,0,0,.1);
        background: rgba(248,248,248,.9);
    }
    .sky-form footer:after {
        content: '';
        display: table;
        clear: both;
    }
    .sky-form a {
        color: #2da5da;
    }
    .sky-form .label {
        display: block;
        margin-bottom: 6px;
        line-height: 19px;
        font-weight: 400;
    }
    .sky-form .label.col {
        margin: 0;
        padding-top: 10px;
    }
    .sky-form .note {
        margin-top: 6px;
        padding: 0 1px;
        font-size: 11px;
        line-height: 15px;
        color: #999;
    }
    .sky-form .input,
    .sky-form .select,
    .sky-form .textarea,
    .sky-form .radio,
    .sky-form .checkbox,
    .sky-form .toggle,
    .sky-form .button {
        position: relative;
        display: block;
    }
    .sky-form .input input,
    .sky-form .select select,
    .sky-form .textarea textarea {
        display: block;
        box-sizing: border-box;
        -moz-box-sizing: border-box;
        width: 100%;
        height: 39px;
        padding: 6px 10px;
        outline: none;
        border-width: 2px;
        border-style: solid;
        border-radius: 0;
        background: #fff;
        font: 15px/23px 'Open Sans', Helvetica, Arial, sans-serif;
        color: #404040;
        appearance: normal;
        -moz-appearance: none;
        -webkit-appearance: none;
    }
    .sky-form .progress {
        float: right;
        margin-top: 10px;
        line-height: 39px;
        color: #232323;
    }
    .sky-form button::-moz-focus-inner {
        padding: 0;
        border: 0;
    }
   
   
    /**/
    /* captcha inputs */
    /**/
    .sky-form .input-captcha img {
        position: absolute;
        top: 2px;
        right: 2px;
        border-left: 1px solid #e5e5e5;
    }
   
   
    /**/
    /* file inputs */
    /**/
    .sky-form .input-file .button {
        position: absolute;
        top: 4px;
        right: 4px;
        float: none;
        height: 31px;
        margin: 0;
        padding: 0 20px;
        font-size: 13px;
        line-height: 31px;
    }
    .sky-form .input-file .button:hover {
        box-shadow: none;
    }
    .sky-form .input-file .button input {
        position: absolute;
        top: 0;
        right: 0;
        padding: 0;
        font-size: 30px;
        cursor: pointer;
        opacity: 0;
    }
   
   
    /**/
    /* selects */
    /**/
    .sky-form .select i {
        position: absolute;
        top: 2px;
        right: 2px;
        width: 28px;
        height: 35px;
        background: #fff;
        pointer-events: none;
    }
    .sky-form .select i:after,
    .sky-form .select i:before {
        content: '';
        position: absolute;
        right: 10px;
        border-right: 4px solid transparent;
        border-left: 4px solid transparent;
    }
    .sky-form .select i:after {
        bottom: 12px;
        border-top: 4px solid #404040;
    }
    .sky-form .select i:before {
        top: 12px;
        border-bottom: 4px solid #404040;
    }
    .sky-form .select select {
        padding-right: 28px;
    }
    .sky-form .select-multiple select {
        height: auto;
    }
   
   
    /**/
    /* textareas */
    /**/
    .sky-form .textarea textarea {
        height: auto;
        resize: none;
    }
    .sky-form .textarea-resizable textarea {
        resize: vertical;      
    }
    .sky-form .textarea-expandable textarea {
        height: 39px;
    }
    .sky-form .textarea-expandable textarea:focus {
        height: auto;
    }
   
   
    /**/
    /* radios and checkboxes */
    /**/
    .sky-form .radio,
    .sky-form .checkbox {
        margin-bottom: 4px;
        padding-left: 27px;
        font-size: 15px;
        line-height: 27px;
        color: #404040;
        cursor: pointer;
    }
    .sky-form .radio:last-child,
    .sky-form .checkbox:last-child {
        margin-bottom: 0;
    }
    .sky-form .radio input,
    .sky-form .checkbox input {
        position: absolute;
        left: -9999px;
    }
    .sky-form .radio i,
    .sky-form .checkbox i {
        position: absolute;
        top: 5px;
        left: 0;
        display: block;
        width: 13px;
        height: 13px;
        outline: none;
        border-width: 2px;
        border-style: solid;
        background: #fff;
    }
    .sky-form .radio i {
        border-radius: 50%;
    }
    .sky-form .radio input + i:after,
    .sky-form .checkbox input + i:after {
        position: absolute;
        opacity: 0;
        -ms-transition: opacity 0.1s;
        -moz-transition: opacity 0.1s;
        -webkit-transition: opacity 0.1s;
    }
    .sky-form .radio input + i:after {
        content: '';
        top: 4px;
        left: 4px;
        width: 5px;
        height: 5px;
        border-radius: 50%;
    }
    .sky-form .checkbox input + i:after {
        content: '\f00c';
        top: -1px;
        left: -1px;
        width: 15px;
        height: 15px;
        font: normal 12px/16px FontAwesome;
        text-align: center;
    }
    .sky-form .radio input:checked + i:after,
    .sky-form .checkbox input:checked + i:after {
        opacity: 1;
    }
    .sky-form .inline-group {
        margin: 0 -30px -4px 0;
    }
    .sky-form .inline-group:after {
        content: '';
        display: table;
        clear: both;
    }
    .sky-form .inline-group .radio,
    .sky-form .inline-group .checkbox {
        float: left;
        margin-right: 30px;
    }
    .sky-form .inline-group .radio:last-child,
    .sky-form .inline-group .checkbox:last-child {
        margin-bottom: 4px;
    }
   
   
    /**/
    /* toggles */
    /**/
    .sky-form .toggle {
        margin-bottom: 4px;
        padding-right: 61px;
        font-size: 15px;
        line-height: 27px;
        color: #404040;
        cursor: pointer;
    }
    .sky-form .toggle:last-child {
        margin-bottom: 0;
    }
    .sky-form .toggle input {
        position: absolute;
        left: -9999px;
    }
    .sky-form .toggle i {
        content: '';
        position: absolute;
        top: 4px;
        right: 0;
        display: block;
        width: 49px;
        height: 17px;
        border-width: 2px;
        border-style: solid;
        border-radius: 12px;
        background: #fff;
    }
    .sky-form .toggle i:after {
        content: 'OFF';
        position: absolute;
        top: 2px;
        right: 8px;
        left: 8px;
        font-style: normal;
        font-size: 9px;
        line-height: 13px;
        font-weight: 700;
        text-align: left;
        color: #5f5f5f;
    }
    .sky-form .toggle i:before {
        content: '';
        position: absolute;
        z-index: 1;
        top: 4px;
        right: 4px;
        display: block;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        opacity: 1;
        -ms-transition: right 0.2s;
        -moz-transition: right 0.2s;
        -webkit-transition: right 0.2s;
    }
    .sky-form .toggle input:checked + i:after {
        content: 'ON';
        text-align: right;
    }
    .sky-form .toggle input:checked + i:before {
        right: 36px;
    }
   
   
    /**/
    /* ratings */
    /**/
    .sky-form .rating {
        margin-bottom: 4px;
        font-size: 15px;
        line-height: 27px;
        color: #404040;
    }
    .sky-form .rating:last-child {
        margin-bottom: 0;
    }
    .sky-form .rating input {
        position: absolute;
        left: -9999px;
    }
    .sky-form .rating label {
        display: block;
        float: right;
        height: 17px;
        margin-top: 5px;
        padding: 0 2px;
        font-size: 17px;
        line-height: 17px;
        cursor: pointer;
    }
   
   
    /**/
    /* buttons */
    /**/
    .sky-form .button {
        float: right;
        height: 39px;
        overflow: hidden;
        margin: 10px 0 0 20px;
        padding: 0 25px;
        outline: none;
        border: 0;
        font: 300 15px/39px 'Open Sans', Helvetica, Arial, sans-serif;
        text-decoration: none;
        color: #fff;
        cursor: pointer;
    }
    .sky-form .button-uploading {
        position: relative;
        color: transparent;
        cursor: default;
    }
    .sky-form .button-uploading:after {
        content: 'Uploading...';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        color: #fff;
        -o-animation: blink 1s linear infinite;
        -ms-animation: blink 1s linear infinite;
        -moz-animation: blink 1s linear infinite;
        -webkit-animation: blink 1s linear infinite;
    }
    @-o-keyframes blink
    {
      0% {opacity: 1}
      50% {opacity: 0.3}
      100% {opacity: 1}
    }
    @-ms-keyframes blink
    {
      0% {opacity: 1}
      50% {opacity: 0.3}
      100% {opacity: 1}
    }
    @-moz-keyframes blink
    {
      0% {opacity: 1}
      50% {opacity: 0.3}
      100% {opacity: 1}
    }
    @-webkit-keyframes blink
    {
      0% {opacity: 1}
      50% {opacity: 0.3}
      100% {opacity: 1}
    }
   
   
    /**/
    /* icons */
    /**/
    .sky-form .icon-append,
    .sky-form .icon-prepend {
        position: absolute;
        top: 5px;
        width: 29px;
        height: 29px;
        font-size: 15px;
        line-height: 29px;
        text-align: center;
    }
    .sky-form .icon-append {
        right: 5px;
        padding-left: 3px;
        border-left-width: 1px;
        border-left-style: solid;
    }
    .sky-form .icon-prepend {
        left: 5px;
        padding-right: 3px;
        border-right-width: 1px;
        border-right-style: solid;
    }
    .sky-form .input .icon-prepend + input,
    .sky-form .textarea .icon-prepend + textarea {
        padding-left: 46px;
    }
    .sky-form .input .icon-append + input,
    .sky-form .textarea .icon-append + textarea {
        padding-right: 46px;
    }
    .sky-form .input .icon-prepend + .icon-append + input,
    .sky-form .textarea .icon-prepend + .icon-append + textarea {
        padding-left: 46px;
    }
   
   
    /**/
    /* grid */
    /**/
    .sky-form .row {
        margin: 0 -15px;
    }
    .sky-form .row:after {
        content: '';
        display: table;
        clear: both;
    }
    .sky-form .col {
        float: left;
        min-height: 1px;
        padding-right: 15px;
        padding-left: 15px;
        box-sizing: border-box;
        -moz-box-sizing: border-box;
    }
    .sky-form .col-1 {
        width: 8.33%;
    }
    .sky-form .col-2 {
        width: 16.66%;
    }
    .sky-form .col-3 {
        width: 25%;
    }
    .sky-form .col-4 {
        width: 33.33%;
    }
    .sky-form .col-5 {
        width: 41.66%;
    }
    .sky-form .col-6 {
        width: 50%;
    }
    .sky-form .col-7 {
        width: 58.33%;
    }
    .sky-form .col-8 {
        width: 66.67%;
    }
    .sky-form .col-9 {
        width: 75%;
    }
    .sky-form .col-10 {
        width: 83.33%;
    }
    .sky-form .col-11 {
        width: 91.66%;
    }
    @media screen and (max-width: 600px) {
        .sky-form .col {
                float: none;
                width: 100%;
        }
    }
   
   
    /**/
    /* tooltips */
    /**/
    .sky-form .tooltip {
        position: absolute;
        z-index: 1;
        left: -9999px;
        padding: 2px 8px 3px;
        font-size: 11px;
        line-height: 16px;
        font-weight: 400;
        background: rgba(0,0,0,0.9);
        color: #fff;
        opacity: 0;
        -ms-transition: margin 0.3s, opacity 0.3s;
        -moz-transition: margin 0.3s, opacity 0.3s;
        -webkit-transition: margin 0.3s, opacity 0.3s;
    }
    .sky-form .tooltip:after {
        content: '';
        position: absolute;
    }
    .sky-form .input input:focus + .tooltip,
    .sky-form .textarea textarea:focus + .tooltip {
        opacity: 1;    
    }
   
    .sky-form .tooltip-top-right {
        bottom: 100%;
        margin-bottom: 15px;
    }
    .sky-form .tooltip-top-right:after {
        top: 100%;
        right: 16px;    
        border-top: 4px solid rgba(0,0,0,0.9);
        border-right: 4px solid transparent;
        border-left: 4px solid transparent;
    }
    .sky-form .input input:focus + .tooltip-top-right,
    .sky-form .textarea textarea:focus + .tooltip-top-right {
        right: 0;
        left: auto;
        margin-bottom: 5px;
    }
   
    .sky-form .tooltip-top-left {
        bottom: 100%;
        margin-bottom: 15px;
    }
    .sky-form .tooltip-top-left:after {
        top: 100%;
        left: 16px;
        border-top: 4px solid rgba(0,0,0,0.9);
        border-right: 4px solid transparent;
        border-left: 4px solid transparent;
    }
    .sky-form .input input:focus + .tooltip-top-left,
    .sky-form .textarea textarea:focus + .tooltip-top-left {
        right: auto;
        left: 0;
        margin-bottom: 5px;
    }
   
    .sky-form .tooltip-right {
        top: 9px;
        white-space: nowrap;
        margin-left: 15px;
    }
    .sky-form .tooltip-right:after {
        top: 6px;
        right: 100%;
        border-top: 4px solid transparent;
        border-right: 4px solid rgba(0,0,0,0.9);
        border-bottom: 4px solid transparent;
    }
    .sky-form .input input:focus + .tooltip-right,
    .sky-form .textarea textarea:focus + .tooltip-right {
        left: 100%;
        margin-left: 5px;
    }
   
    .sky-form .tooltip-left {
        top: 9px;
        white-space: nowrap;
        margin-right: 15px;
    }
    .sky-form .tooltip-left:after {
        top: 6px;
        left: 100%;
        border-top: 4px solid transparent;
        border-bottom: 4px solid transparent;
        border-left: 4px solid rgba(0,0,0,0.9);
    }
    .sky-form .input input:focus + .tooltip-left,
    .sky-form .textarea textarea:focus + .tooltip-left {
        right: 100%;
        left: auto;
        margin-right: 5px;
    }
   
    .sky-form .tooltip-bottom-right {
        top: 100%;
        margin-top: 15px;
    }
    .sky-form .tooltip-bottom-right:after {
        bottom: 100%;
        right: 16px;    
        border-right: 4px solid transparent;
        border-bottom: 4px solid rgba(0,0,0,0.9);
        border-left: 4px solid transparent;
    }
    .sky-form .input input:focus + .tooltip-bottom-right,
    .sky-form .textarea textarea:focus + .tooltip-bottom-right {
        right: 0;
        left: auto;
        margin-top: 5px;
    }
   
    .sky-form .tooltip-bottom-left {
        top: 100%;
        margin-top: 15px;
    }
    .sky-form .tooltip-bottom-left:after {
        bottom: 100%;
        left: 16px;
        border-right: 4px solid transparent;
        border-bottom: 4px solid rgba(0,0,0,0.9);
        border-left: 4px solid transparent;
    }
    .sky-form .input input:focus + .tooltip-bottom-left,
    .sky-form .textarea textarea:focus + .tooltip-bottom-left {
        right: auto;
        left: 0;
        margin-top: 5px;
    }
   
   
    /**/
    /* normal state */
    /**/
    .sky-form .input input,
    .sky-form .select select,
    .sky-fo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0