LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
Hello!
Rating
Conclusion

Step Form Design Experience

Are you happy with our service?

Hello,

Thank you for your input!

Reset
CSS
@import url(https://fonts.googleapis.com/css?family=Roboto:400,300);
@import url(https://fonts.googleapis.com/css?family=Pacifico);

* {
	font-size: 16px;
}

input:focus,
button:focus {
	outline: none;
}

button:hover,
.reset:hover {
	opacity: .8;
}

button:active,
.reset:active {
	opacity: .5;
}

.container {
	width: 400px;
	position: absolute;
	top: 50%;
	left: 50%;
	-webkit-transform: translate(-50%, -50%);
	-ms-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
}

.steps {
	margin-bottom: 10px;
	position: relative;
	height: 25px;
}

.steps > div {
	position: absolute;
	top: 0;
	-webkit-transform: translate(-50%);
	-ms-transform: translate(-50%);
	transform: translate(-50%);
	height: 25px;
	padding: 0 5px;;
	display: inline-block;
	width: 80px;
	text-align: center;
	-webkit-transition: .3s all ease;
	transition: .3s all ease;
}

.steps > div > span {
	line-height: 25px;
	height: 25px;
	margin: 0;
	color: #777;
	font-family: 'Roboto', sans-serif;
	font-size: .9rem;
	font-weight: 300;
}

.steps > div > .liner {
	position: absolute;
	height: 2px;
	width: 0%;
	left: 0;
	top: 50%;
	margin-top: -1px;
	background: #999;
	-webkit-transition: .3s all ease;
	transition: .3s all ease;
}

.step-one {
	left: 0;
}

.step-two {
	left: 50%;
	clip: rect(0, 0px, 25px, 0px);
}

.step-three {
	left: 100%;
	clip: rect(0, 0px, 25px, 0px);
}

.line {
	width: 100%;
	height: 5px;
	background: #ddd;
	position: relative;
	border-radius: 10px;
	overflow: visible;
	margin-bottom: 50px;
}

.line .dot-move {
	position: absolute;
	top: 50%;
	left: 0%;
	width: 15px;
	height: 15px;
	-webkit-transform: translate(-50%, -50%);
	-ms-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
	background: #ddd;
	border-radius: 50%;
	-webkit-transition: .3s all ease;
	transition: .3s all ease;
}

.line .dot {
	position: absolute;
	top: 50%;
	width: 15px;
	height: 15px;
	left: 0;
	background: #ddd;
	border-radius: 50%;
	-webkit-transition: .3s all ease;
	transition: .3s all ease;
	-webkit-transform: translate(-50%, -50%) scale(.5);
	-ms-transform: translate(-50%, -50%) scale(.5);
	transform: translate(-50%, -50%) scale(.5);
}

.line .dot.zero {
	left: 0%;
	background: #bbb;
}

.container.slider-one-active .dot.zero {
	background: #5892fc;
}

.line .dot.center {
	left: 50%;
	background: #bbb
}

.line .dot.full {
	left: 100%;
	background: #bbb
}

.slider-ctr {
	width: 100%;
	overflow: hidden;
}

.slider {
	overflow: hidden;
	width: 1200px;
	-webkit-transition: .3s all ease;
	transition: .3s all ease;
	-webkit-transform: translate(0px) scale(1);
	-ms-transform: translate(0px) scale(1);
	transform: translate(0px) scale(1);
}

.container.slider-one-active .slider-two,
.container.slider-one-active .slider-three {
	-webkit-transform: scale(.5);
	-ms-transform: scale(.5);
	transform: scale(.5);
}

.container.slider-two-active .slider-one,
.container.slider-two-active .slider-three {
	-webkit-transform: scale(.5);
	-ms-transform: scale(.5);
	transform: scale(.5);
}

.container.slider-three-active .slider-one,
.container.slider-three-active .slider-two {
	-webkit-transform: scale(.5);
	-ms-transform: scale(.5);
	transform: scale(.5);
}

.slider-one,
.slider-two,
.slider-three {
	-webkit-transition: .3s all ease;
	transition: .3s all ease;
}

.slider-form {
	float: left;
	width: 400px;
	text-align: center;
}

.slider-form h2 {
	font-size: 1.5rem;
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	margin-bottom: 50px;
	color: #999;
	position: relative;
}

.slider-form h2 .yourname {
	font-weight: 400;
}

.slider-form h3 {
	font-size: 1.5rem;
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	margin-bottom: 50px;
	line-height: 1.5;
	color: #999;
	position: relative;
}

.slider-form h3 .balapa {
	font-family: 'Pacifico', sans-serif;
	display: inline-block;
	color: #5892fc;
	text-decoration: none
}

.slider-form [type="text"] {
	width: 100%;
	box-sizing: border-box;
	padding: 15px 20px;
	background: #fafafa;
	border: 1px solid transparent;
	color: #777;
	border-radius: 50px;
	margin-bottom: 50px;
	font-size: 1rem;
	font-family: 'Roboto', sans-serif;
	position: relative;
	z-index: 99;
}

.slider-form [type="text"]:focus {
	background: #fcfcfc;
	border: 1px solid #ddd;
}

.slider-form button,
.reset {
  display: inline-block;
  text-decoration: none;
	background: #5892fc;
	border: none;
	color: white;
	padding: 10px 25px;
	font-size: 1rem;
	border-radius: 3px;
	cursor: pointer;
	font-family: 'Roboto', sans-serif;
	font-weight: 300;
	position: relative;
}

/*  emot */

.label-ctr {
	margin-bottom: 50px;
}

label.radio {
	height: 55px;
	width: 55px;
	display: inline-block;
	margin: 0 10px;
	background: transparent;
	position: relative;
	border-radius: 50%;
	cursor: pointer
}

label.radio input {
	visibility: hidden
}

label.radio input:checked + .emot {
	-webkit-transform: scale(1.25);
	-ms-transform: scale(1.25);
	transform: scale(1.25);
}

label.radio input:checked + .emot,
label.radio input:checked + .emot .mouth {
	border-color: #5892fc;
}

label.radio input:checked + .emot:before,
label.radio input:checked + .emot:after {
	background: #5892fc;
}

label.radio .emot {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #fafafa;
	border-radius: 50%;
	border: 2px solid #ddd;
	-webkit-transition: .3s all ease;
	transition: .3s all ease;
}

label.radio .emot:before {
	content: "";
	position: absolute;
	top: 15px;
	left: 15px;
	width: 5px;
	height: 10px;
	background: #ddd;
}

label.radio .emot:after {
	content: "";
	position: absolute;
	top: 15px;
	right: 15px;
	width: 5px;
	height: 10px;
	background: #ddd;
}

label.radio .emot .mouth {
	position: absolute;
	bottom: 10px;
	right: 15px;
	left: 15px;
	height: 15px;
	border-radius: 50%;
	border: 3px solid #ddd;
	background: transparent;
	clip: rect(0, 35px, 10px, 0);
}

label.radio .emot .mouth.smile {
	-webkit-transform: rotate(180deg);
	-ms-transform: rotate(180deg);
	transform: rotate(180deg);
}

label.radio .emot .mouth.sad {
	-webkit-transform: translateY(50%);
	-ms-transform: translateY(50%);
	transform: translateY(50%);
}

/*	center */

.container.center .line .dot-move {
	left: 50%;
	-webkit-animation: .3s anim 1;
}

.container.center .line .dot.center {
	background: #5892fc;
}

.container.center .slider {
	-webkit-transform: translate(-400px);
	-ms-transform: translate(-400px);
	transform: translate(-400px);
}

.container.center .step-two {
	clip: rect(0, 100px, 25px, 0px);
}

.container.center .step-one .liner {
	width: 100%;
}

/*	full */

.container.full .line .dot-move {
	left: 100%;
	-webkit-animation: .3s anim 1;
}

.container.full .line .dot.full {
	background: #5892fc;
}

.container.full .slider {
	-webkit-transform: translate(-800px);
	-ms-transform: translate(-800px);
	transform: translate(-800px);
}

.container.full .step-two,
.container.full .step-three {
	clip: rect(0, 100px, 25px, 0px);
}

.container.full .step-one .liner,
.container.full .step-two .liner {
	width: 100%;
}
JS
var $firstButton = $(".first"),
  $secondButton = $(".second"),
  $input = $("input"),
  $name = $(".name"),
  $more = $(".more"),
  $yourname = $(".yourname"),
  $reset = $(".reset"),
  $ctr = $(".container");

$firstButton.on("click", function(e){
  $(this).text("Saving...").delay(900).queue(function(){
    $ctr.addClass("center slider-two-active").removeClass("full slider-one-active");
  });
  e.preventDefault();
});

$secondButton.on("click", function(e){
  $(this).text("Saving...").delay(900).queue(function(){
    $ctr.addClass("full slider-three-active").removeClass("center slider-two-active slider-one-active");
    $name = $name.val();
    if($name == "") {
      $yourname.html("Anonymous!");
    }
    else { $yourname.html($name+"!"); }
  });
  e.preventDefault();
});

// copy
balapaCop("Step by Step Form", "#999");
Host Instantly Drag and Drop Website Builder

 

Description

A simple step form for customer experience. The purpose of this form is to get the feedback from user for the store.
Term
Mon, 11/27/2017 - 21:32

Related Codes

Pen ID
Pen ID
Pen ID