Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- Updated 4.6.2016 added Pure JS and jQuery Support-->
<body>
  <div class="overlay">
  <a class="mk-search-trigger mk-fullscreen-trigger" href="#" style="display: table-cell; padding: 0 30px 0 20px; vertical-align: middle;" id="search-button-listener">
    <div id="search-button"><i class="fa fa-search"></i></div>
  </a>
  <div class="mk-fullscreen-search-overlay" id="mk-search-overlay">
    <a href="#" class="mk-fullscreen-close" id="mk-fullscreen-close-button"><i class="fa fa-times"></i></a>
    <div id="mk-fullscreen-search-wrapper">
      <form method="get" id="mk-fullscreen-searchform" action="">
        <input type="text" value="" placeholder="Search..." id="mk-fullscreen-search-input">
        <i class="fa fa-search fullscreen-search-icon"><input value="" type="submit"></i>
      </form>
    </div>
  </div>
  </div>
</body>
              
            
!

CSS

              
                /*Creator: Ryan Tarson Website: ryantarson.com updated 6.16.16 added fixed issues with chrome outline also new animations, also preformance update*/
/* Body Styling and Search icon */
@import url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css);
body,
html{
  width: 100%;
  height: 100%;
}
body{
	background: url('https://images.unsplash.com/photo-1444090695923-48e08781a76a?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=cb58d4212ead01ed72fdffd6b78601ab') center no-repeat;
	background-size: cover;
	margin: 0;
}
.overlay{
	height: 100%;
	width: 100%;
	background: rgba(0, 0, 0, 0.8);
	
}

.mk-search-trigger {
  position: absolute;
  top: 45%;
  left: 45%;
}


/* Search Overlay */

.mk-fullscreen-search-overlay #mk-fullscreen-search-wrapper #mk-fullscreen-searchform input[type=submit] {
  position: absolute;
  width: 100px;
  height: 100%;
  background-color: transparent;
  border: 0;
  right: 0;
  top: 0;
}
#mk-fullscreen-searchform:focus{
  outline: none;
  border: none;
}

.mk-fullscreen-search-overlay #mk-fullscreen-search-wrapper #mk-fullscreen-searchform .fullscreen-search-icon {
  font-size: 25px;
  position: absolute;
  right: 15px;
  width: 25px;
  top: 30px;
  color: #fff;
  color: rgba(255, 255, 255, .2);
  -webkit-transition: all .2s ease-out;
  -moz-transition: all .2s ease-out;
  -ms-transition: all .2s ease-out;
  -o-transition: all .2s ease-out;
  transition: all .2s ease-out;
}
.fullscreen-search-icon:hover,
.fullscreen-search-icon:focus{
  border: none;
  outline: none;
  color: #fff !important;
  -webkit-transition: transform ease-out .2s;
  -moz-transition: transform ease-out .2s;
  -ms-transition: transform ease-out .2s;
  -o-transition: transform ease-out .2s;
  transition: transform ease-out .2s;
  transform: rotate(180deg);
}

#mk-fullscreen-searchform {
  position: relative;
  verticle-align: middle;
}

.mk-fullscreen-search-overlay #mk-fullscreen-search-wrapper #mk-fullscreen-searchform #mk-fullscreen-search-input {
  width: 800px;
  background-color: transparent;
  -webkit-box-shadow: 0 3px 0 0 rgba(255, 255, 255, .1);
  -moz-box-shadow: 0 3px 0 0 rgba(255, 255, 255, .1);
  box-shadow: 0 3px 0 0 rgba(255, 255, 255, .1);
  border: 0;
  text-align: center;
  font-size: 35px;
  padding: 20px;
  color: #fff;
  -webkit-transition: all .3s ease-out;
  -moz-transition: all .3s ease-out;
  -ms-transition: all .3s ease-out;
  -o-transition: all .3s ease-out;
  transition: all .3s ease-out;
}
.mk-fullscreen-search-overlay #mk-fullscreen-search-wrapper #mk-fullscreen-searchform #mk-fullscreen-search-input:focus{
  boder: none;
  outline: none;
}

.mk-fullscreen-search-overlay.mk-fullscreen-search-overlay-show {
  visibility: visible;
  opacity: 1;
}

.mk-fullscreen-search-overlay {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  background-color: rgba(0, 0, 0, .94);
  text-align: center;
  -webkit-transition: all ease-in-out .25s;
  -moz-transition: all ease-in-out .25s;
  -ms-transition: all ease-in-out .25s;
  -o-transition: all ease-in-out .25s;
  transition: all ease-in-out .25s;
}

.mk-animate-element,
.mk-effect-bg-layer,
.mk-fullscreen-search-overlay {
  -webkit-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
}

.mk-fullscreen-search-overlay {
  z-index: 999;
}

.mk-fullscreen-search-overlay .mk-fullscreen-close:link,
.mk-fullscreen-search-overlay .mk-fullscreen-close:visited {
  color: #fff;
}

.mk-fullscreen-search-overlay .mk-fullscreen-close {
  position: absolute;
  right: 50px;
  top: 70px;
  font-size: 26px;
  -webkit-transition: transform ease-out .2s;
  -moz-transition: transform ease-out .2s;
  -ms-transition: transform ease-out .2s;
  -o-transition: transform ease-out .2s;
  transition: transform ease-out .2s;
  transform: rotate(0deg);
}

.mk-fullscreen-search-overlay.mk-fullscreen-search-overlay-show #mk-fullscreen-search-wrapper {
  opacity: 1;
  visibility: visible;
  -webkit-transform: scale(1);
  -moz-transform: scale(1);
  -ms-transform: scale(1);
  -o-transform: scale(1);
  transform: scale(1);
  ms-transform: scale(1);
}

.mk-fullscreen-search-overlay #mk-fullscreen-search-wrapper {
  display: inline-block;
  max-width: 1000px;
  vertical-align: middle;
  text-align: center;
  font-size: 18px;
  -webkit-transform: scale(0.9);
  -moz-transform: scale(0.9);
  -ms-transform: scale(0.9);
  -o-transform: scale(0.9);
  transform: scale(0.9);
  ms-transform: scale(0.9);
  opacity: 0;
  visibility: hidden;
  -webkit-transition: all ease-in-out .3s;
  -moz-transition: all ease-in-out .3s;
  -ms-transition: all ease-in-out .3s;
  -o-transition: all ease-in-out .3s;
  transition: all ease-in-out .3s;
}

.mk-search-trigger {
  -webkit-transition: color .2s ease-in-out;
  -moz-transition: color .2s ease-in-out;
  -ms-transition: color .2s ease-in-out;
  -o-transition: color .2s ease-in-out;
  transition: color .2s ease-in-out
}
/* Search Button */
#search-button {
  display: relative;
  vertical-align: middle;
  height: 50px;
  width: 40px;
  border: white solid 0.7px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 1;
  padding-right: 10px;
  -webkit-transition: all 400ms;
  -moz-transition: all 400ms;
  -ms-transition: all 400ms;
  -o-transition: all 400ms;
  -webkit-transform: rotate(0deg);
  -moz-transform: rotate(0deg);
  -ms-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  transform: rotate(0deg);
}
#search-button i{
  color: white !important;
  font-size: 20px;
  position: absolute;
  left: 15px;
  top: 15px;
}

#search-button:hover,
.mk-fullscreen-close:hover {
  opacity: 0.6;
  -webkit-transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  -o-transform: rotate(180deg);
  transform: rotate(180deg);
  -webkit-transition: all 400ms;
  -moz-transition: all 400ms;
  -ms-transition: all 400ms;
  -o-transition: all 400ms;
}
#mk-fullscreen-search-input:focus{
  box-shadow: 0px 3px 0px 0px rgba(255,255,255,0.54) !important;
}

              
            
!

JS

              
                //Program created by Ryan Tarson Updated 6.15.16, under this code is my pure JS Version
jQuery(document).ready(function($) {
  var wHeight = window.innerHeight;
  //search bar middle alignment
  $('#mk-fullscreen-searchform').css('top', wHeight / 2);
  //reform search bar
  jQuery(window).resize(function() {
    wHeight = window.innerHeight;
    $('#mk-fullscreen-searchform').css('top', wHeight / 2);
  });
  // Search
  $('#search-button').click(function() {
    console.log("Open Search, Search Centered");
    $("div.mk-fullscreen-search-overlay").addClass("mk-fullscreen-search-overlay-show");
  });
  $("a.mk-fullscreen-close").click(function() {
    console.log("Closed Search");
    $("div.mk-fullscreen-search-overlay").removeClass("mk-fullscreen-search-overlay-show");
  });
});

/* Don't Like jQuery or have a custom jQuery that's conflicting? Then you can use my Pure JS program Below. Runs exactly the same and so is the preformance just Pure JS*/
//Program made by Ryan Tarson
/*
 var wHeight = window.innerHeight;
 var sb = document.getElementById("search-button");
 var closeSB = document.getElementById("mk-fullscreen-close-button");
 var SearchOverlay = document.getElementById("mk-search-overlay");
 var searchBar = document.getElementById("mk-fullscreen-searchform");
 searchBar.style.top=wHeight/2 +'px';
  console.log(wHeight);
  window.addEventListener("resize", function(){
	  console.log(wHeight);
	   wHeight = window.innerHeight;
	   searchBar.style.top=wHeight/2 + 'px';
  }, true);
  document.addEventListener("click", function(){
  sb.onclick = function(){
	console.log("Opened Search for Element: ");
	SearchOverlay.classList.add("mk-fullscreen-search-overlay-show");
  };
  closeSB.onclick = function(){
	  console.log("Closed Search for Element: " + closeSB);
	  SearchOverlay.classList.remove("mk-fullscreen-search-overlay-show");
  };
  }, true);
  */
              
            
!
999px

Console