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 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.

Quick-add: + add another resource

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.

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.

              <div class="wrapper">
  <div class="tunnel tunnel1"></div>
  <div class="tunnel tunnel2"></div>
  <div class="tunnel tunnel3"></div>

  SVG Background Images Performance tips!

  1. The FPS gets better the smaller the SVG file.
  2. Set your vector graphic's artboard/canvas to be as close to the reproduced size as possible. When in doubt as to the final size, go large. With vectors, larger canvases don't take more bytes than small ones, but they'll render nicer, especially in FireFox.
  3. To avoid sub-pixel anti-aliasing between tiled images, make sure your artboard is in whole pixels.
  4. In Illustrator, save as SVG 1.1 and "Clip to artboard!"
  In the CSS and markup!
  Originally I tried to do multiple animated backgrounds, like I've done before with PNGs: http://24ways.org/2012/flashless-animation/
  But the performance was TERRIBLE, especially in FireFox and on my iPhone 4s. Then @askoth made a demo doing the same thing by arranging the background into several div tiles and using translate to animate them upward: https://codepen.io/anon/pen/ulbHA

  What happens is that rather than calculating the background CONSTANTLY, the browser is able to "bake" a few tiles and shift them around. This gives us very nearly 60fps in Chrome and makes it look great in Firefox.
              html { height: 100%;}
body { background: #000; height: 100%;}
@keyframes fall {
  0% { 
    transform: translate(0, 0)
  100% {
    transform: translate(0, -900px)

.wrapper {
  background: #5A4F4A;
	margin: 0 auto;
  width: 530px; height: 100%;
  overflow: hidden;
  position: relative;

.tunnel {
  animation: fall 6s linear infinite;
	width: 100%; height: 900px;
		url(http://stash.rachelnabors.com/codepen/alice/bg-tunnel-border-left.svg?1) 0 0 repeat-y,
		url(http://stash.rachelnabors.com/codepen/alice/bg-tunnel-border-right.svg?1) 100% 0 repeat-y,
		url(http://stash.rachelnabors.com/codepen/alice/bg-tunnel-furniture-comp900.svg) top center repeat-y,
		20px 150px, 
		20px 150px, 
		auto 900px,
		auto auto
  position: absolute;
  left: 0; top: 0;

.tunnel2 {
  top: 900px;

.tunnel3 {
  top: 1800px;
Loading ..................