LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Material log in card

Sign In
CSS
@import url(https://fonts.googleapis.com/css?family=Roboto:400,500,700,400italic,500italic,700italic);
/**
 * Basic stuff.
 */
*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: 'Roboto', Arial, sans-serif;
}
body {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  color: #424242;
  background-color: #e0e0e0;
}
h2 {
  margin: 16px auto 24px;
  font-size: 45px;
  font-weight: 300;
  line-height: 1.5;
  text-align: center;
}
.container {
  position: relative;
  padding: 64px 16px;
}
.banner {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  background-image: url(http://www.img.lirent.net/2014/10/Android-Lollipop-wallpapers-Google-Now-Wallpaper-2.png);
  background-size: cover;
  background-position: 50% 0%;
  background-repeat: no-repeat;
  -webkit-filter: blur(16px);
          filter: blur(16px);
}
/* --------------------------------
 * Material login card.
 * -------------------------------- */
/**
 * Card.
 */
.card {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  margin: 0 auto;
  max-width: 260px;
  background-color: #fff;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 3px 3px -3px rgba(0, 0, 0, 0.2), 0 2px 8px 0 rgba(0, 0, 0, 0.12);
}
/* Card ribbon */
.card__ribbon {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  height: 168px;
  width: 100%;
  background-image: -webkit-linear-gradient(267deg, transparent 77%, #fff 23%), url(http://www.img.lirent.net/2014/10/Android-Lollipop-wallpapers-Google-Now-Wallpaper-2.png);
  background-image: linear-gradient(-177deg, transparent 77%, #fff 23%), url(http://www.img.lirent.net/2014/10/Android-Lollipop-wallpapers-Google-Now-Wallpaper-2.png);
  background-size: 100%, cover;
  background-position: bottom left, 50% 50%;
  background-repeat: no-repeat;
}
/* Card title */
.card__title {
  padding: 16px;
  color: #fff;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  cursor: default;
}
.card__title--ribbon {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-flex: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
  -ms-flex-line-pack: center;
      align-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  height: 128px;
}
.card__title--shadow {
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.14), 0 1px 1px rgba(0, 0, 0, 0.2), 0 -1px 2px rgba(0, 0, 0, 0.12);
}
.card__title-text {
  font-size: 24px;
  line-height: 24px;
}
.card__title-sub-text {
  font-size: 16px;
  line-height: 20px;
}
/* Card main content */
.card__content {
  padding: 16px;
  color: #424242;
  font-size: 14px;
  line-height: 20px;
}
/* Card action area */
.card__action {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  padding: 8px;
}
.card__action + .card__action {
  padding-top: 0;
}
/* --------------------------------
 * Inputfield.
 * -------------------------------- */
.inputfield {
  position: relative;
  padding: 20px 0;
}
/* Inputfield input */
.inputfield__input {
  display: block;
  padding: 4px 0;
  width: 100%;
  color: inherit;
  font-size: 16px;
  line-height: 21px;
  background-color: transparent;
  border: 0 solid rgba(0, 0, 0, 0.12);
  border-bottom-width: 1px;
}
/* Inputfield label */
.inputfield__label {
  position: absolute;
  top: 24px;
  left: 0;
  z-index: -1;
  color: #000;
  font-size: 16px;
  font-weight: 400;
  line-height: 21px;
  pointer-event: none;
  -webkit-transition: all 0.28s ease-in-out;
  transition: all 0.28s ease-in-out;
}
.inputfield.is-dirty .inputfield__label,
.inputfield__input:focus ~ .inputfield__label {
  top: 0;
  font-size: 12px;
  font-weight: 500;
  -webkit-transition-duration: .14s;
          transition-duration: .14s;
}
.inputfield.is-dirty .inputfield__label {
  color: #757575;
}
.inputfield__input:focus ~ .inputfield__label {
  color: #009688;
}
/* Inputfield under-line */
.inputfield__underline {
  position: absolute;
  bottom: 20px;
  left: 50%;
  right: 50%;
  height: 2px;
  background-color: #009688;
  -webkit-transition: all 0.28s ease-in-out;
  transition: all 0.28s ease-in-out;
}
.inputfield__input:focus ~ .inputfield__underline {
  left: 0%;
  right: 0%;
  -webkit-transition-duration: .21s;
          transition-duration: .21s;
}
/* --------------------------------
 * Button.
 * -------------------------------- */
.btn {
  display: inline-block;
  padding: 0 8px;
  color: #424242;
  line-height: 36px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
  background-color: #fff;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: 10% 10%;
  border: 0;
  border-radius: 2px;
  -webkit-transition: box-shadow 0.28s ease-in-out;
  transition: box-shadow 0.28s ease-in-out;
  box-shadow: 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px rgba(0, 0, 0, 0);
}
.btn:hover {
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.02), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}
.btn:focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
.btn.is-animating {
  background-image: -webkit-radial-gradient(circle, rgba(255, 255, 255, 0.26) 10%, rgba(255, 255, 255, 0) 11%);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.26) 10%, rgba(255, 255, 255, 0) 11%);
  -webkit-animation: btnRipple .35s forwards linear;
          animation: btnRipple .35s forwards linear;
}
.btn:focus:active,
.btn:active {
  box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);
}
.btn--block {
  display: block;
  width: 100%;
}
.btn--primary {
  color: #fff;
  background-color: #3f51b5;
}
.btn--primary:focus:active,
.btn--primary:active {
  background-image: -webkit-radial-gradient(circle, rgba(255, 255, 255, 0.26) 10%, rgba(255, 255, 255, 0) 11%);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.26) 10%, rgba(255, 255, 255, 0) 11%);
}
.btn--secondry {
  color: #fff;
  background-color: #009688;
}
.btn--secondry:focus:active,
.btn--secondry:active {
  background-image: -webkit-radial-gradient(circle, rgba(255, 255, 255, 0.26) 10%, rgba(255, 255, 255, 0) 11%);
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.26) 10%, rgba(255, 255, 255, 0) 11%);
}
@-webkit-keyframes btnRipple {
  84% {
    background-size: 1000% 1000%;
  }
  100% {
    background-size: 1100% 1100%;
  }
}
@keyframes btnRipple {
  84% {
    background-size: 1000% 1000%;
  }
  100% {
    background-size: 1100% 1100%;
  }
}
/* --------------------------------
 * Toggle.
 * -------------------------------- */
.toggle {
  position: relative;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
}
.toggle--block {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  margin-top: 8px;
}
/* Toggle input */
.toggle__input {
  position: absolute;
  z-index: -1;
  height: 0;
  width: 0;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  pointer-events: none;
  border: 0 !important;
  opacity: 0;
}
/* Toggle label */
.toggle__label {
  -webkit-box-ordinal-group: 2;
      -ms-flex-order: 1;
          order: 1;
  font-size: 16px;
  font-weight: 500;
}
/* Toggle checkbox */
.toggle__checkbox {
  position: relative;
  z-index: 1;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-ordinal-group: 1;
      -ms-flex-order: 0;
          order: 0;
  -ms-flex-item-align: center;
      align-self: center;
  margin: auto;
  margin-left: 8px;
  margin-right: 16px;
  height: 18px;
  width: 18px;
  background-color: #fff;
  border: 2px solid #000;
  border-radius: 2px;
  cursor: pointer;
  -webkit-transition: all 0.28s ease-in-out;
  transition: all 0.28s ease-in-out;
}
.toggle__checkbox::after {
  position: absolute;
  top: -1px;
  left: -1px;
  z-index: -1;
  content: '';
  height: 48px;
  width: 48px;
  background-color: rgba(66, 66, 66, 0.12);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  -webkit-perspective: 18px;
          perspective: 18px;
  -webkit-perspective-origin: 9px 9px;
          perspective-origin: 9px 9px;
  -webkit-transform-origin: 9px 9px 0;
          transform-origin: 9px 9px 0;
  -webkit-transform: scale(0) translate(-16px, -16px);
          transform: scale(0) translate(-16px, -16px);
}
.toggle__checkbox.is-animating::after {
  -webkit-animation: checkBoxRipple .42s linear forwards;
          animation: checkBoxRipple .42s linear forwards;
}
.toggle__input:checked ~ .toggle__checkbox {
  background-color: #009688;
  border-color: #009688;
}
.toggle__input:checked ~ .toggle__checkbox::after {
  background-color: rgba(0, 150, 136, 0.26);
}
/* Toggle checkbox mark */
.toggle__checkbox-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 10px;
  width: 5px;
  margin-top: -5.5px;
  margin-left: -2.25px;
  border: 0 solid #fff;
  border-bottom-width: 2px;
  border-right-width: 2px;
  -webkit-perspective: 10px;
          perspective: 10px;
  -webkit-perspective-origin: 2.25px 5.5px;
          perspective-origin: 2.25px 5.5px;
  -webkit-transform-origin: 2.25px 5.5px 0;
          transform-origin: 2.25px 5.5px 0;
  -webkit-transform: rotate(45deg) scale(0);
          transform: rotate(45deg) scale(0);
  -webkit-transition: all 0.28s ease-in-out;
  transition: all 0.28s ease-in-out;
}
.toggle__input:checked ~ .toggle__checkbox > .toggle__checkbox-mark {
  -webkit-transform: rotate(45deg) scale(1);
          transform: rotate(45deg) scale(1);
}
@-webkit-keyframes checkBoxRipple {
  84% {
    opacity: 1;
    -webkit-transform: scale(1) translate(-16px, -16px);
            transform: scale(1) translate(-16px, -16px);
  }
  100% {
    opacity: 0;
    -webkit-transform: scale(1.1) translate(-16px, -16px);
            transform: scale(1.1) translate(-16px, -16px);
  }
}
@keyframes checkBoxRipple {
  84% {
    opacity: 1;
    -webkit-transform: scale(1) translate(-16px, -16px);
            transform: scale(1) translate(-16px, -16px);
  }
  100% {
    opacity: 0;
    -webkit-transform: scale(1.1) translate(-16px, -16px);
            transform: scale(1.1) translate(-16px, -16px);
  }
}
/* --------------------------------
 * Helpers.
 * -------------------------------- */
.sr-only {
  position: absolute;
  overflow: hidden;
  padding: 0;
  height: 1px;
  width: 1px;
  clip: rect(0 0 0 0);
  clip: rect(0, 0, 0, 0);
  border: 0;
}
JS
/* --------------------------------
 * Simple ripple effect for
 * custom checkbox and buttons.
 * Plus a simple floating label example.
 * -------------------------------- */

(function () {
	'use strict';

	/**
	 * Toggle classes.
	 */
	var IS_ANIMATING = 'is-animating';
	var IS_DIRTY = 'is-dirty';

	// @shout https://davidwalsh.name/css-animation-callback
	// @shout https://tympanus.net/codrops/?p=23217

	/**
	 * Animation end event.
	 * @return	mixed
	 */
	var whichAnimationEvent = function () {
		var a;
		var el = document.createElement('loginfakeelement');
		var animations = {
			'animation'				:'animationend',
			'OAnimation'			:'oAnimationEnd',
			'MozAnimation'		:'animationend',
			'WebkitAnimation'	:'webkitAnimationEnd'
		}

		for (a in animations) {
			if (el.style[a] !== undefined) {
				return animations[a];
			}
		}

		return flase;
	}

	/**
	 * Check if device is mobile.
	 * @return	boolean
	 */
	var mobilecheck = function () {
		var check = false;

		(function (a) {
			if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)) {
				check = true;
			}
		})(navigator.userAgent || navigator.vendor || window.opera);

		return check;
	};

	// Event type.
	var eventtype = mobilecheck() ? 'touchstart' : 'click';
	// Animation end short var.
	var animationEnd = whichAnimationEvent();
	/**
		* Toggle animation class.
		* @return	void
		*/
	var animationClassToggle = function () {
		// Add `animating` class.
		this.classList.add(IS_ANIMATING);

		// Remove `animating` class if
		// animation end is not supported.
		if ( ! animationEnd) {
			this.classList.remove(IS_ANIMATING);

			return;
		}

		// Remove `animating` class on animation end.
		animationEnd && this.addEventListener(animationEnd, function () {
			if (this.classList.contains(IS_ANIMATING)) {
				this.classList.remove(IS_ANIMATING);
			}
		});
	};

	/**
	 * Checkbox ripple event.
	 * @see checkBoxRipple	line 404 CSS
	 * @see animationClassToggle()
	 */
	[].slice.call(document.querySelectorAll('.toggle__checkbox')).forEach(function (el) {
		el.addEventListener(eventtype, animationClassToggle.bind(el));
	});

	/**
	 * Button ripple event.
	 * @see btnRipple		line 293 CSS
	 * @see animationClassToggle()
	 */
	[].slice.call(document.querySelectorAll('.btn')).forEach(function (el) {
		el.addEventListener(eventtype, animationClassToggle.bind(el));
	});

	/**
	 * Inputfields floating label.
	 */
	[].slice.call(document.querySelectorAll('.inputfield')).forEach(function (el) {
		var input = el.querySelector('.inputfield__input');
		/**
		 * Check input value.
		 * @return	void
		 */
		var checkValue = function () {
			if (input.value != '' && ! el.classList.contains(IS_DIRTY)) {
				el.classList.add(IS_DIRTY);
			} else if (input.value == '' && el.classList.contains(IS_DIRTY)) {
				el.classList.remove(IS_DIRTY);
			}
		};

		// Add `input` and `change` event listeners.
		input.addEventListener('input', checkValue);
		input.addEventListener('change', checkValue);
		// Check value on content load.
		document.addEventListener('DOMContentLoaded', checkValue);
	});

})();
Host Instantly Drag and Drop Website Builder

 

Term
Wed, 11/29/2017 - 11:27

Related Codes

Pen ID
Pen ID
Pen ID