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

              
                	<div id="radios">
		<input id="png" value="png" type="radio" name="filetype" checked="checked" class="filetype" /><label for="png"> Use PNG</label>
		<input id="svg" value="svg" type="radio" name="filetype" class="filetype" /><label for="svg"> Use SVG</label>
	</div>
	<div id="explanation">
    <p>Using SVGs for sprites results in much worse performance in browsers. Try changing between PNG and SVG in the box above and watch the framerate drop.</p>
    <p>Get in touch on Twitter if you have any questions: @adrianosmond</p>
    <p>Aug 23rd 2013 - this has been fixed in Chrome.</p>
    <p>Mar 24th 2014 - also fixed in Firefox.</p>
	</div>
	<div id="container" class="png">
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
		<span class="icon home-icon"></span>
		<span class="icon right-arrow"></span>
		<span class="icon down-arrow"></span>
		<span class="icon plus-icon"></span>
		<span class="icon minus-icon"></span>
		<span class="icon warning-icon"></span>
		<span class="icon error-icon"></span>
		<span class="icon capped-icon"></span>
		<span class="icon oyster-tap-icon"></span>
		<span class="icon contactless-icon"></span>
		<span class="icon oyster-card-icon"></span>
		<span class="icon to-icon"></span>
		<span class="icon card-icon"></span>
		<span class="icon calendar-icon"></span>
		<span class="icon document-icon"></span>
		<span class="icon spreadsheet-icon"></span>
		<span class="icon bullet-icon"></span>
		<span class="icon form-tooltip-icon"></span>
		<span class="icon crosshair-icon"></span>
		<span class="icon tube-icon"></span>
		<span class="icon bus-icon"></span>
		<span class="icon rail-icon"></span>
		<span class="icon river-icon"></span>
		<span class="icon dlr-icon"></span>
		<span class="icon tram-icon"></span>
		<span class="icon mail-icon"></span>
		<span class="icon phone-icon"></span>
		<span class="icon email-icon"></span>
		<span class="icon cablecar-icon"></span>
		<span class="icon up-stairs-icon"></span>
		<span class="icon down-stairs-icon"></span>
		<span class="icon up-escalator-icon"></span>
		<span class="icon down-escalator-icon"></span>
		<span class="icon no-zone-1-icon"></span>
		<span class="icon up-ramp-icon"></span>
		<span class="icon down-ramp-icon"></span>
		<span class="icon up-lift-icon"></span>
		<span class="icon down-lift-icon"></span>
		<span class="icon accessible-icon"></span>
		<span class="icon inverse-accessible-icon"></span>
		<span class="icon pushchair-icon"></span>
		<span class="icon luggage-icon"></span>
		<span class="icon elderly-icon"></span>
		<span class="icon disabled-icon"></span>
		<span class="icon headphones-icon"></span>
		<span class="icon family-icon"></span>
	</div>
              
            
!

CSS

              
                @import "compass/css3";

body {
	font-family: Arial, sans-serif;
}

#container {
	max-width: 800px;
	margin: 0 auto;
}

#radios, #explanation {
	position: fixed;
	background-color: #fff;
	border: 1px solid #ccc;
}

#radios { 
	padding: 15px;
}

#explanation {
	top: 100px;
	width: 200px;
	padding: 0 15px;
}

#png, label[for='png'] {
	margin-bottom: 15px;
}

label:after {
	content:"";
	display: block;
}

$icon-width: 32px;
$icon-height: 32px;
$sprite-rows: 42;
$sprite-cols: 3;

@mixin sprite-position($row, $col) {
	background-position: (-1 * $icon-width * ($col - 1) ) (-1 * $icon-height * ($row - 1));
}

.icon {
	float: left;
	margin: 10px;
    background-image: url('http://adrianosmond.com/images/sprite.png');
    background-size: $sprite-cols*$icon-width $sprite-rows*$icon-height;
    width: $icon-width;
    height: $icon-height;
    display: block;
    &.vertically-centred {
		margin-top: -1 * ($icon-height / 2);
    }
}

.svg .icon {
	background-image: url('http://adrianosmond.com/images/sprite.svg');
}

.home-icon {
	@include sprite-position(4, 2);
}

.right-arrow {
	@include sprite-position(21, 1);
	right: 0;
}

.down-arrow {
	@include sprite-position(22, 1);
}

.plus-icon {
	@include sprite-position(23, 1);
}

.minus-icon {
	@include sprite-position(24, 1);
}

.warning-icon {
	@include sprite-position(27, 1);
}

.error-icon {
	@include sprite-position(27, 2);
}

.capped-icon {
	@include sprite-position(42, 3);
}

.expand-collapse-icon {
	@include sprite-position(23, 2);
}

.oyster-icon {
	@include sprite-position(15,3);
}

.oyster-tap-icon {
	@include sprite-position(14,3);
}

.contactless-icon {
	@include sprite-position(13,3);
}

.oyster-card-icon {
	@include sprite-position(41,1);
}

.to-icon {
	@include sprite-position(41,2);
}

.card-icon {
	@include sprite-position(40,3);
}

.calendar-icon {
	@include sprite-position(41,3);
}

.tick-icon {
	@include sprite-position(7,2);
}

.document-icon {
	@include sprite-position(7,3);
}

.spreadsheet-icon {
	@include sprite-position(6,3);
}

.bullet-icon {
	@include sprite-position(37,1);
}

.form-tooltip-icon {
	@include sprite-position(12,3);
}

.crosshair-icon {
	@include sprite-position(1,1);
}

.tube-icon {
	@include sprite-position(34,1);
}

.bus-icon {
	@include sprite-position(11,1);
}

.rail-icon {
	@include sprite-position(12,1);
}

.river-icon {
	@include sprite-position(13,1);
}

.dlr-icon {
	@include sprite-position(14,1);
}

.tram-icon {
	@include sprite-position(15,1);
}

.mail-icon {
	@include sprite-position(37,3);
}

.phone-icon {
	@include sprite-position(39,3);
}

.email-icon {
	@include sprite-position(38,3);
}

.cablecar-icon {
	@include sprite-position(16,1);
}

.up-stairs-icon {
	@include sprite-position(28,1);	
}

.down-stairs-icon {
	@include sprite-position(29,1);	
}

.up-escalator-icon {
	@include sprite-position(30,1);	
}

.down-escalator-icon {
	@include sprite-position(31,1);	
}

.no-zone-1-icon {
	@include sprite-position(32,1);	
}

.up-ramp-icon {
	@include sprite-position(33,1);	
}

.down-ramp-icon {
	@include sprite-position(33,2);	
}

.up-lift-icon {
	@include sprite-position(33,3);	
}

.down-lift-icon {
	@include sprite-position(29,3);	
}

.accessible-icon {
	@include sprite-position(32,3);	
}

.inverse-accessible-icon {
	@include sprite-position(32,2);	
}

.pushchair-icon {
	@include sprite-position(29,2);	
}

.luggage-icon {
	@include sprite-position(31,2);	
}

.elderly-icon {
	@include sprite-position(30,2);	
}

.disabled-icon {
	@include sprite-position(30,3);	
}

.headphones-icon {
	@include sprite-position(31,3);	
}

.family-icon {
	@include sprite-position(28,2);	
}
              
            
!

JS

              
                /*
 The code here was put together very quickly in order to demonstrate the issue that all things being equal, SVG performs worse than PNG when used as background images in sprites. For more on the thought process behind this, read http://adrianosmond.com/using-svg-for-sprites-a-cautionary-tale/ or get in touch on Twitter: @adrianosmond.
 */

    var $radios = $(".filetype");
		var $container = $("#container");
		var changeRadios = function () {
			$container.attr("class", $(this).val());
		};
		$radios.change(changeRadios);
		var scrollTime = 10000;
		var scrollDown = function() {
			$("html, body").animate({ scrollTop: "2000px" }, scrollTime);	
		};

		var scrollUp = function() {
			$("html, body").animate({ scrollTop: "0px" }, scrollTime);	
		};
		
		scrollDown();
		setInterval(scrollDown, 2 * scrollTime);
		setTimeout(function() {
			scrollUp()
			setInterval(scrollUp, 2 * scrollTime);
		}, scrollTime);
              
            
!
999px

Console