Pen Settings



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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


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


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.


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.


                <div class="container">
  <h1>Twitter buttons with no iframe</h1>  
<h3>Custom Tweet button</h3>
<div class="custom-tweet-button">
  <a href=";text=Twitter buttons for mobile - no iframes yay! from @alistairtweedie&amp;via=codepen" target="_blank" alt ="Tweet this pen">
    <i class="btn-icon"></i>
    <span class="btn-text">Tweet</span>

<h3>Custom Follow button</h3>  
<div class="custom-follow-button">
  <a href="" target="_blank" alt="Follow alistairtweedie">
    <i class="btn-icon"></i>
    <span class="btn-text">Follow @alistairtweedie</span>
  <p>Embedding Tweet and Follow buttons on responsive sites can be a bit of a touchy subject. Including them can increase page load time greatly.</p> 

  <p>By creating a custom button we have a 'lite' version for mobile devices that won't slow the page down. </p>
   <p>Some functionality of the iframed versions isn't available but anyone who really cares about seeing the tweet count is surely just in it for the ego boost! :P enjoy!</p>



                body {
  background: #f2f2f2;
  color: #555;
p {
    line-height: 1.6;
.container {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
.custom-follow-button {
  width: 200px;
  margin: 1em auto 2em;
.custom-tweet-button a,
.custom-follow-button a {
  position: relative;
  display: inline-block;
  height: 16px;
  padding: 2px;
  border: 1px solid #ccc;
  font-size: 11px;
  color: #333;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
  font-weight: bold;
  background-color: #F8F8F8;
  background-image: -webkit-gradient(linear,left top,left     bottom,from(#FFF),to(#DEDEDE));
  background-image: -moz-linear-gradient(top,#FFF,#DEDEDE);
  background-image: -o-linear-gradient(top,#FFF,#DEDEDE);
  background-image: -ms-linear-gradient(top,#FFF,#DEDEDE);
  border: #CCC solid 1px;
  -moz-border-radius: 3px;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
.custom-tweet-button a:hover,
.custom-follow-button a:hover  {
  border-color: #BBB;
  background-color: #F8F8F8;
  background-image: -webkit-gradient(linear,left top,left bottom,from(#F8F8F8),to(#D9D9D9));
  background-image: -moz-linear-gradient(top,#F8F8F8,#D9D9D9);
  background-image: -o-linear-gradient(top,#F8F8F8,#D9D9D9);
  background-image: -ms-linear-gradient(top,#F8F8F8,#D9D9D9);
  background-image: linear-gradient(top,#F8F8F8,#D9D9D9);
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
.custom-tweet-button a .btn-icon,
.custom-follow-button a .btn-icon{
  position: absolute;
  width: 16px;
  height: 13px;
  top: 50%;
  left: 3px;
  margin-top: -6px;
  background: url('') 1px center no-repeat;
  background-size: 13px;
.custom-tweet-button a .btn-text,
.custom-follow-button a .btn-text{
  display: inline-block;
  padding: 2px 3px 0 20px;