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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

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


  <legend>Zoom Spots</legend>
  <div aria-hidden="true">Zoom Spots</div>
  <label for="default">Default</label>
  <input type="radio" id="default" name="zoomies" value="default" checked>
  <label for="bus">Bus</label>
  <input type="radio" id="bus" name="zoomies" value="bus">
  <label for="car">Car</label>
  <input type="radio" id="car" name="zoomies" value="car">
  <label for="walk">Walk Sign</label>
  <input type="radio" id="walk" name="zoomies" value="walk">
  <label for="mail">Mail Truck</label>
  <input type="radio" id="mail" name="zoomies" value="mail">
  <label for="stop">Bus Stop</label>
  <input type="radio" id="stop" name="zoomies" value="stop">
  <label for="peak">Peak</label>
  <input type="radio" id="peak" name="zoomies" value="peak">
  <div role="img" aria-label="Looking up a wet Chicago city street in the early evening, cars with headlights facing the camera, a bus and bus stop on the left of the image, a mail truck next to walking sign on the right, and in the middle center is the top of an office tower against a cloudy blue sky."></div>

  <a href="" target="_top">Forked</a>; demonstrating <code>&lt;legend&gt;</code> with <code>grid-template-columns</code>.

<!-- -->
<!-- -->
<!-- -->


                body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.4;
  display: grid;
  place-items: center;
  min-height: 95vh;

div[role="img"] {
  width: 50vmin;
  aspect-ratio: 1920 / 2402;
  background-image: url("");
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: 100%;

@media screen and (prefers-reduced-motion: no-preference) {
  div[role="img"] {
    transition: all 0.2s ease-out;

#bus:checked ~ div[role="img"] {
  background-position: 29% 71%;
  background-size: 600%;

#car:checked ~ div[role="img"] {
  background-position: 70% 76%;
  background-size: 550%;

#walk:checked ~ div[role="img"] {
  background-position: 77% 67%;
  background-size: 1200%;

#mail:checked ~ div[role="img"] {
  background-position: 71% 68%;
  background-size: 800%;

#stop:checked ~ div[role="img"] {
  background-position: 0% 71%;
  background-size: 600%;

#peak:checked ~ div[role="img"] {
  background-position: 52% 39%;
  background-size: 800%;

/* Layout */

fieldset {
  display: grid;
  grid-template-columns: 50vmin 5em 1.5em;
  gap: 0.25em 1em;
  max-width: 33em;
  padding-top: .75em;

fieldset > * {
  align-self: start;

fieldset div[role="img"] {
  grid-row: 1 / span 9;

legend {
/*  Visually hides it  */
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  white-space: nowrap;

fieldset > div[aria-hidden] {
/*  The legend replacement  */
/*  The -1 allows it to span grid-template-columns  */
  grid-column: 2 / -1;
  font-weight: bold;
  margin-top: 5vw;

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 80%;
  padding: 1em;
  text-align: center;
  background-color: #fff;
  border-top: .01em solid #ddd;