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;
   .........完整代码请登录后点击上方下载按钮下载查看

网友评论0