LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
×

Boom! Profile Created

Create User Profile

CSS
@import url(https://fonts.googleapis.com/css?family=Lato:100,300,400);
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, center,
dl, dt, dd, ol, ul, 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: inherit;
  font-size: 100%;
  vertical-align: baseline;
}

html {
  line-height: 1;
}

ol, ul {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

caption, th, td {
  text-align: left;
  font-weight: normal;
  vertical-align: middle;
}

q, blockquote {
  quotes: none;
}
q:before, q:after, blockquote:before, blockquote:after {
  content: "";
  content: none;
}

a img {
  border: none;
}

article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
  display: block;
}

* {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuMCIgeDI9IjEuMCIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzJjY2FiYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzFlYzY4ZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
  background-size: 100%;
  background-image: -webkit-gradient(linear, 0% 0%, 100% 100%, color-stop(0%, #2ccaba), color-stop(100%, #1ec68d));
  background-image: -moz-linear-gradient(top, #2ccaba, #1ec68d);
  background-image: -webkit-linear-gradient(top, #2ccaba, #1ec68d);
  background-image: linear-gradient(to bottom right, #2ccaba, #1ec68d);
  color: #fff;
}

.confirm {
  position: absolute;
  width: 100%;
  height: 100%;
  color: #2ecc71;
  background-color: #fff;
  z-index: 100;
  text-align: center;
  -moz-transform: scale(0, 0);
  -ms-transform: scale(0, 0);
  -webkit-transform: scale(0, 0);
  transform: scale(0, 0);
  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
  opacity: 0;
  -moz-transition: all 0.4s ease;
  -o-transition: all 0.4s ease;
  -webkit-transition: all 0.4s ease;
  transition: all 0.4s ease;
}
.confirm.show {
  -moz-transform: scale(1, 1);
  -ms-transform: scale(1, 1);
  -webkit-transform: scale(1, 1);
  transform: scale(1, 1);
  filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false);
  opacity: 1;
}
.confirm .close {
  position: absolute;
  right: 20px;
  top: 20px;
  color: rgba(0, 0, 0, 0.2);
  font-size: 60px;
  display: inline-block;
  padding: 20px;
  cursor: pointer;
}
.confirm .close:hover {
  color: rgba(0, 0, 0, 0.7);
}
.confirm h1 {
  margin: 0 auto;
  margin-top: 35vh;
  display: inline-block;
  font-size: 48px;
  line-height: 1;
}
.confirm h1 .fa {
  display: block;
}

form {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
}

.row > div {
  width: 33.33333333333333%;
  display: inline-block;
  margin-right: -5px;
  position: relative;
}
.row > div:after {
  content: '';
  border-right: 1px solid rgba(255, 255, 255, 0.7);
  position: absolute;
  top: 3px;
  height: 75%;
  right: -3px;
}
.row > div:last-child:after {
  display: none;
}

h1 {
  font-weight: 300;
  font-size: 26px;
  line-height: 3;
  margin-bottom: 25px;
  text-align: center;
}
h1 .fa-camera-retro {
  width: 100px;
  height: 100px;
  line-height: 100px;
  border: 2px solid #fff;
  cursor: pointer;
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  -moz-transition: background-color 0.3s ease;
  -o-transition: background-color 0.3s ease;
  -webkit-transition: background-color 0.3s ease;
  transition: background-color 0.3s ease;
}
h1 .fa-camera-retro:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.btn {
  font-family: 'Lato', sans-serif;
  border: none;
  width: 100%;
  display: block;
  padding: 15px;
  background-color: #fff;
  font-size: 18px;
  color: #2ecc71;
  cursor: pointer;
  -moz-transition: all 0.3s ease;
  -o-transition: all 0.3s ease;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  -moz-border-radius: 0;
  -webkit-border-radius: 0;
  border-radius: 0;
}
.btn:hover, .btn:focus {
  color: #333;
  outline: none;
}

#clear {
  background: none;
  color: #fff;
  font-weight: 100;
}

.float-label {
  position: relative;
  margin-bottom: 10px;
}
.float-label label, .float-label input, .float-label select, .float-label textarea {
  font-family: 'Lato', sans-serif;
  font-size: 24px;
  font-weight: 300;
}
.float-label input, .float-label select, .float-label textarea {
  -webkit-appearance: none;
  outline: none;
  border: none;
  width: 100%;
  display: block;
  cursor: pointer;
  -moz-border-radius: 0;
  -webkit-border-radius: 0;
  border-radius: 0;
  font-family: 'Lato', sans-serif;
  font-size: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  color: #fff;
  padding: 15px 20px 10px 10px;
}
.float-label label {
  position: absolute;
  left: 10px;
  top: 18px;
  color: #fff;
  pointer-events: none;
  -moz-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
.float-label label.active {
  font-size: 14px;
  font-weight: 400;
  top: -1px;
  color: rgba(0, 0, 0, 0.7);
}
.float-label textarea {
  height: 100px;
  resize: none;
}
.float-label .fa {
  position: absolute;
  right: 5px;
  bottom: 20px;
  font-size: 12px;
}
.float-label .fa.eye {
  right: 0;
  bottom: 2px;
  z-index: 10;
  padding: 20px;
  padding-right: 0;
  font-size: 16px;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.5);
}
.float-label .fa.eye.show {
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 320px) {
  .row > div {
    display: block;
    width: auto;
  }
  .row > div:after {
    display: none;
  }
}
JS
(function($){
	function floatLabel(inputType){
		$(inputType).each(function(){
			var input = $(this).find("input, select, textarea");
      var label = $(this).find("label");
			// on focus add cladd active to label
			input.focus(function(){
				input.next().addClass("active");
        console.log("focus");
			});
			//on blur check field and remove class if needed
			input.blur(function(){
				if(input.val() === '' || input.val() === 'blank'){
					label.removeClass();
				}
			});
		});
	}
	// just add a class of "floatLabel to any group you want to have the float label interactivity"
	floatLabel(".float-label");
  
  
//////  Just a bunch of fluff for other interactions  ////////////////////////////////////////////////////////  
  
  //for the pw field - toggle visibility
  $(".eye").on("click" , function(){
    var $this = $(this);
    if( !$this.is(".show") ){
      $this.addClass("show")
           .removeClass("fa-eye-slash")
           .addClass("fa-eye").next()
           .attr("type" , "text");
    }else{
      $this.removeClass("show")
           .addClass("fa-eye-slash")
           .removeClass("fa-eye")
           .next().attr("type" , "password");
    }
  });
  
  //modal close
  $(".close").on("click" , function(){
    $(this).parent().removeClass("show");
    $("#clear").click();
  })
  
  //submit button dirty validation ^-^
  $("button[type='submit']").on("click" , function(){
    if( !$("input, select, textarea").val() ){ 
      $(this).text("Please enter all Fields");
    }else{
      $(".confirm").addClass("show");
    }
    return false;
  })
  //just for reset button
  $("#clear").on("click" , function(){
    $(".active").removeClass("active");
  });
  
})(jQuery);

Description

A responsive user profile form, with floated labels, and password visibility toggle.
Term
Mon, 11/27/2017 - 21:29

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv