Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <!-- Begin Demo Content -->
<div class="container mt-5 mb-5">
  <div class="jumbotron">
    <h1>Example Page</h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sem lorem, rhoncus eu ipsum quis, blandit accumsan ex. Donec in orci id urna maximus placerat at eu ante. Maecenas rutrum, dolor nec facilisis tristique, velit sem convallis libero, quis laoreet quam turpis quis nisl.</p>
    <a href="#" class="btn btn-primary">Click Here</a>
  </div>
    <h3>Example Page</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sem lorem, rhoncus eu ipsum quis, blandit accumsan ex. Donec in orci id urna maximus placerat at eu ante. Maecenas rutrum, dolor nec facilisis tristique, velit sem convallis libero, quis laoreet quam turpis quis nisl.</p>  
    <h3>Example Page</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sem lorem, rhoncus eu ipsum quis, blandit accumsan ex. Donec in orci id urna maximus placerat at eu ante. Maecenas rutrum, dolor nec facilisis tristique, velit sem convallis libero, quis laoreet quam turpis quis nisl.</p> 
    <h3>Example Page</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sem lorem, rhoncus eu ipsum quis, blandit accumsan ex. Donec in orci id urna maximus placerat at eu ante. Maecenas rutrum, dolor nec facilisis tristique, velit sem convallis libero, quis laoreet quam turpis quis nisl.</p> 
</div>
<!-- End Demo Content -->

<!-- Begin Cookie Bar -->
<div id="cookie-bar">
   <div class="cookie-bar-wrap">
    <span class="cookie-text">We use cookies to help improve your experience on this website. By continuing to browse the site you are agreeing to our use of cookies. View our <a href="https://www.etps.co.uk/corporate/policies/privacy.aspx" target="_blank">cookies policy</a> for more information.</span>
    <button type="button" tabindex="1" id="cookie-accept" onclick="etpsAcceptCookies();">Continue</button>
  </div>
</div>
<!-- End Cookie Bar -->

              
            
!

CSS

              
                #cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  width: 100%;
  color: #ffffff;
  background-color: rgba(65,65,65,0.9);
  text-align: left;
  font-size: 13px;
  line-height: 2;
  direction: ltr;
  min-height: 30px;
  z-index: 99999;
  padding: 6px 20px 4px;  
  transform: translateY(999px);
  opacity: 0;
  -webkit-transition: all 0.5s ease-in-out;
	-moz-transition: all 0.5s ease-in-out;
	-o-transition: all 0.5s ease-in-out;
	transition: all 0.5s ease-in-out;
}
#cookie-bar.active {
  transform: translateY(0);
  opacity: 1;
}
#cookie-bar .cookie-bar-wrap {
  width: 100%;
  margin: auto;
  display: -ms-flexbox;
  display: flex; 
  -ms-flex-pack: justify;
  justify-content: space-between;
  -ms-flex-align: center;
  align-items: center;
}
#cookie-bar a {
  color: #ffffff;
  text-decoration: underline;
}
#cookie-bar button {
    margin: 0 0 0 15px;
    line-height: 20px;
    background: rgba(111,111,111,0.7);
    border: none;
    color: #fff;
    padding: 4px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;  
    text-transform: uppercase;
}

              
            
!

JS

              
                /* Cookie Functions */
function etpsSetCookie(cookieName, cookieValue, nDays) {
	  var today = new Date();
	  var expire = new Date();
	  if (nDays==null || nDays==0) nDays=1;
	  expire.setTime(today.getTime() + 3600000*24*nDays);
	  document.cookie = cookieName+"="+escape(cookieValue)+";expires="+expire.toGMTString()+"; path=/";
}
function etpsReadCookie(cookieName) {
	  var theCookie=" "+document.cookie;
	  var ind=theCookie.indexOf(" "+cookieName+"=");
	  if (ind==-1) ind=theCookie.indexOf(";"+cookieName+"=");
	  if (ind==-1 || cookieName=="") return "";
	  var ind1=theCookie.indexOf(";",ind+1);
	  if (ind1==-1) ind1=theCookie.length; 
	  return unescape(theCookie.substring(ind+cookieName.length+2,ind1));
}

/** This is where the cookie is defined- set to 182 days which is roughly 6 months **/
function etpsAcceptCookies() {
	  etpsSetCookie('etpsCookies', true, 182);
	  $("#cookie-bar").removeClass('active').hide();
}

/** If the cookie doesnt exist, show the cookie bar **/
$(document).ready(function(){
  if(!etpsReadCookie("etpsCookies")){
      $("#cookie-bar").show().addClass('active');
  }
});
              
            
!
999px

Console