cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <p>Scroll down to see the "Back to Top" link appear.</p>
<p>The link only appears when the page has been scrolled away from the top.</p>
<p>When you use the "Back to Top" link or scroll back to the top, the link disapears.</p>
<p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>junk</p><p>Scroll up to see the "Back to Top" link disapear.</p>
            
          
!
            
              .bak2top {
  font-family:Sans-Serif;
  font-size:14px;
  font-weight:bold;
  color:#0000FF;
  background-color:#CCCCFF;
  border:1px solid;
  border-color:#0000FF;
  padding:2px;
  position:absolute;
  z-index:2;
  right:-500px;
  cursor:pointer;
}
            
          
!
            
              // Bak2Top v1.8 by MaxxBlade www.maxxblade.co.uk/bak2top
function b2o(){return document.documentElement.scrollTop;}
function b2t(){
  b2te=document.getElementById('bttl').style;
  b2te.right="10px";
  b2te.top=((b2o()<1)?-500:document.documentElement.clientHeight+b2o()-50)+'px';
  setTimeout('b2t()',99);
}
var b2tDiv=document.createElement('div');
b2tDiv.innerHTML = '<a onclick="JavaScript:window.scrollTo(0,0)"><div id="bttl" class="bak2top">Back To Top</div></a>';
document.body.appendChild(b2tDiv);
b2t();
            
          
!
999px
Loading ..................

Console