stepsForm实现多步骤带进度答题表单效果代码

代码语言:html

所属分类:表单美化

代码描述:stepsForm实现多步骤带进度答题表单效果代码

代码标签: 步骤 进度 答题 表单 效果

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

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/normalize.css">
    <style>
        @import url(//fonts.googleapis.com/css?family=Lato:400,700,400italic);
    @
    *, *:after, *:before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
    .clearfix:before, .clearfix:after { content: ''; display: table; }
    .clearfix:after { clear: both; }
    
    body {
    	background: #26C281;
    	color: rgba(0,0,0,0.45);
    	font-size: 100%;
    	line-height: 1.25;
    	font-family: 'Lato', Arial, sans-serif;
    }
    
    a {
    	color: rgba(0,0,0,0.25);
    	text-decoration: none;
    	outline: none;
    }
    
    a:hover, a:focus {
    	color: rgba(0,0,0,0.6);
    }
    
    .codrops-header {
    	margin: 0 auto;
    	padding: 3em 1em;
    	text-align: center;
    	color: rgba(0,0,0,0.35);
    }
    
    .codrops-header h1 {
    	margin: 0;
    	font-weight: 400;
    	font-size: 2.5em;
    }
    
    .codrops-header h1 span {
    	display: block;
    	padding: 0 0 0.6em 0.1em;
    	font-size: 0.6em;
    	opacity: 0.7;
    }
    
    /* To Navigation Style */
    .codrops-top {
    	width: 100%;
    	text-transform: uppercase;
    	font-weight: 700;
    	font-size: 0.69em;
    	line-height: 2.2;
    }
    
    .codrops-top a {
    	display: inline-block;
    	padding: 0 1em;
    	text-decoration: none;
    	letter-spacing: 1px;
    }
    
    .codrops-top span.right {
    	float: right;
    }
    
    .codrops-top span.right a {
    	display: block;
    	float: left;
    }
    
    .codrops-icon:before {
    	margin: 0 4px;
    	text-transform: none;
    	font-weight: normal;
    	font-style: normal;
    	font-variant: normal;
    	font-family: 'codropsicons';
    	line-height: 1;
    	speak: none;
    	-webkit-font-smoothing: antialiased;
    }
    
    .codrops-icon-drop:before {
    	content: "\e001";
    }
    
    .codrops-icon-prev:before {
    	content: "\e004";
    }
    
    section {
    	padding: 5em 2em 10em;
    	background: #2dcb89;
    	text-align: center;
    }
    
    section.related {
    	padding: 3em 1em 4em;
    	background: #465650;
    	color: rgba(0,0,0,0.4);
    	font-size: 1.5em;
    }
    
    .related > a {
    	max-width: 80%;
    	border: 2px solid rgba(0,0,0,0.3);
    	display: inline-block;
    	text-align: center;
    	margin: 20px 10px;
    	padding: 25px;
    	-webkit-transition: color 0.3s, border-color 0.3s;
    	transition: color 0.3s, border-color 0.3s;
    }
    
    .related a:hover {
    	border-color: rgba(0,0,0,0.6);
    }
    
    .related a img {
    	max-width: 100%;
    	opacity: 0.4;
    	-webkit-transition: opacity 0.3s;
    	transition: opacity 0.3s;
    }
    
    .related a:hover img,
    .related a:active img {
    	opacity: 1;
    }
    
    .related a h3 {
    	margin: 0;
    	padding: 0.5em 0 0.3em;
    	max-width: 300px;
    	font-weight: 400;
    	font-size: 0.75em;
    	text-align: left;
    }
    
    @media screen and (max-width: 44.75em) {
    	section { padding: 1em 2em; }
    }
    
    @media screen and (max-width: 25em) {
    	.codrops-header { font-size: 0.8em; }
    	section.related { font-size: 1.2em; }
    	.codrops-icon span { display: none; }
    }
    @font-face {
	font-weight: normal;
	font-style: normal;
	font-family: 'icomoon';
	src:url('../fonts/icomoon/icomoon.eot?-9heso');
	src:url('../fonts/icomoon/icomoon.eot?#iefix-9heso') format('embedded-opentype'),
		url('data:font/x-woff;base64,d09GRk9UVE8AAARkAAoAAAAABBwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAAAOgAAADokiiSlk9TLzIAAAHcAAAAYAAAAGAIIvy2Y21hcAAAAjwAAABMAAAATBpVzFdnYXNwAAACiAAAAAgAAAAIAAAAEGhlYWQAAAKQAAAANgAAADb/r9AuaGhlYQAAAsgAAAAkAAAAJAO5AeZobXR4AAAC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8AbQBvAG8Abmljb21vb24AaQBjAG8AbQBvAG8AbgBSAGUAZwB1AGwAYQByAGkAYwBvAG0AbwBvAG4ARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=') format('woff'),
		url('../fonts/icomoon/icomoon.ttf?-9heso') format('truetype'),
		url('../fonts/icomoon/icomoon.svg?-9heso#icomoon') format('svg');
}

.simform {
	position: relative;
	margin: 0 auto;
	padding: 2em 0;
	max-width: 860px;
	width: 100%;
	text-align: left;
	font-size: 2.5em;
}

.simform .submit {
	display: none;
}

/* Question list style */
.simform ol {
	margin: 0;
	padding: 0;
	list-style: none;
	position: relative;
	-webkit-transition: height 0.4s;
	transition: height 0.4s;
}

.simform ol:before {
	content: '';
	background-color: rgba(0,0,0,0.1);
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2.35em;
}

.questions li {
	z-index: 100;
	position: relative;
	visibility: hidden;
	height: 0;
	-webkit-transition: visibility 0s 0.4s, height 0s 0.4s;
	transition: visibility 0s 0.4s, height 0s 0.4s;
}

.questions li.current,
.no-js .questions li {
	visibility: visible;
	height: auto;
	-webkit-transition: none;
	transition: none;
}

/* Labels */
.questions li > span {
	display: block;
	overflow: hidden;
}

.questions li > span label {
	display: block;
	-webkit-transition: -webkit-transform 0.4s;
	transition: transform 0.4s;
	-webkit-transform: translateY(-100%);
	transform: translateY(-100%);
}

.questions li.current > span label,
.no-js .questions li > span label {
	-webkit-transition: none;
	transition: none;
	-webkit-transform: translateY(0);
	transform: translateY(0);
}

.show-next .questions li.current > span label {
	-webkit-animation: moveUpFromDown 0.4s both;
	animation: moveUpFromDown 0.4s both;
}

@-webkit-keyframes moveUpFromDown {
	from { -webkit-transform: translateY(100%); }
	to { -webkit-transform: translateY(0); }
}

@keyframes moveUpFromDown {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}

/* Input field */
.questions input {
	display: block;
	margin: 0.3em 0 0 0;
	padding: 0.5em 1em 0.5em 0.7em;
	width: calc(100% - 2em);
	border: none;
	background: transparent;
	color: rgba(0,0,0,0.8);
	font-size: 1em;
	line-height: 1;
	opacity: 0;
	-webkit-transition: opacity 0.3s;
	transition: opacity 0.3s;
}

.questions .current input,
.no-js .questions input {
	opacity: 1;
}

.questions input:focus,
.simform button:focus {
	outline: none;
}

/* Next question button */
.next {
	position: absolute;
	right: 0;
	bottom: 2.15em; /* padding-bottom o.........完整代码请登录后点击上方下载按钮下载查看

网友评论0