Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <style>
    .highlight {
      font-weight: bold;
      display: inline-block;
      background: #ffdd00;
      color: #193549;
      font-size: 1.2rem;
      padding: 1em 1.3em;
      border-radius: 999px;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    .highlight:hover {
      background: #193549;
      color: #ffdd00;
    }

    #content1,
    #content2,
    #content3 {
      position: absolute;
      overflow: hidden;
      padding-bottom: 1rem;
      top: 5%;
    }

    #b1 {
      left: 73%;
      top: 22%;
    }

    #b2 {
      left: 24%;
      top: 38%;
    }

    #b3 {
      left: 67%;
      top: 64%;
    }

    .hidden {
      display: none;
    }

    .block {
      display: block;
    }

    .bold {
      font-weight: bold;
    }

    .text-s {
      font-size: 1rem;
    }

    .text-m {
      font-size: 2rem;
    }

    .leading-relaxed {
      line-height: 1.625;
    }

    .text-grey {
      color: #193549;
    }

    .text-blue {
      color: #156bc1;
    }

    .text-left {
      text-align: left;
    }

    .text-center {
      text-align: center;
    }

    .mx-auto {
      margin-left: auto;
      margin-right: auto;
    }

    .m-2 {
      margin: 1rem;
    }

    .w-90 {
      width: 90%;
    }

    .mw-1200 {
      max-width: 1200px;
    }

    .rounded {
      border-radius: 4px;
    }

    .shadow {
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }

    .bg-white {
      background: #ffffff;
    }

    .absolute {
      position: absolute;
    }

    body {
      height: 100% !important;
      margin: 5vh 0 !important;
      padding: 0 !important;
      width: 100% !important;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    }

    #hotspots1:checked~#content1,
    #hotspots2:checked~#content2,
    #hotspots3:checked~#content3 {
      display: block;
      margin: 2rem;
      width: 90%;
    }
  </style>
  <style>
    @supports (position: absolute) {
      #hotspots-container {
        display: block !important;
        max-height: none !important;
      }

      #fallback {
        display: none;
      }
    }
  </style>
  <title>Hotspots</title>
</head>

<body>
  <!--[if !mso]><!-->
  <div id="hotspots-container" class="hidden w-90 mw-1200 mx-auto rounded shadow text-center" style="background: url(https://a.cdn-hotels.com/gdcs/production188/d1096/687fb8d7-493d-4a43-a5d4-27be9ce6d30f.jpg) center / cover no-repeat; display: none; max-height: 0; overflow: hidden; mso-hide: all;">
    <div style="padding-bottom: 66.66%; position: relative;" class="text-center">
      <input type="checkbox" class="hidden" id="hotspots1">
      <input type="checkbox" class="hidden" id="hotspots2">
      <input type="checkbox" class="hidden" id="hotspots3">
      <label for="hotspots1" id="b1" class="highlight absolute">1</label>
      <label for="hotspots2" id="b2" class="highlight absolute">2</label>
      <label for="hotspots3" id="b3" class="highlight absolute">3</label>
      <label id="content1" for="hotspots1" class="hidden bg-white rounded shadow text-grey text-left">
        <div style="background: url(https://a.cdn-hotels.com/gdcs/production15/d529/732b9c64-8ceb-4dba-8575-5026ada24dcf.jpg) center / cover no-repeat; padding-bottom: 40%;"></div>
        <p class="m-2 text-m bold text-blue">Akaka Falls</p>
        <p class="m-2 text-s leading-relaxed">Found in Akaka Falls State Park, Akaka Falls is a magnificent sight, cascading 135 metres from a cliff in lush, misty rainforest. Twice the height of Niagara Falls, the free-falling Akaka Falls have a strong flow year-round</p>
      </label>
      <label id="content2" for="hotspots2" class="hidden bg-white rounded shadow text-grey text-left">
        <div style="background: url(https://a.cdn-hotels.com/gdcs/production130/d1663/48040459-9b56-4f75-af8e-f27681893b11.jpg) center / cover no-repeat; padding-bottom: 40%;"></div>
        <p class="m-2 text-m bold text-blue">Kilauea Volcano</p>
        <p class="m-2 text-s leading-relaxed">With lava flows dating back some 250,000 years ago, Kilauea is the youngest of the 5 active volcanoes in Hawaii – but it's also the feistiest</p>
      </label>
      <label id="content3" for="hotspots3" class="hidden bg-white rounded shadow text-grey text-left">
        <div style="background: url(https://a.cdn-hotels.com/gdcs/production91/d364/87b990fe-18d8-4f1d-9496-a0397700226e.jpg) center / cover no-repeat; padding-bottom: 40%;"></div>
        <p class="m-2 text-m bold text-blue">Molokai fringing reef</p>
        <p class="m-2 text-s leading-relaxed">Molokai island’s towering sea cliffs give it a dramatic landscape, but there’s just as much beauty to behold in the depths of the sea waters that surround it</p>
      </label>
    </div>
  </div>
  <!--<![endif]-->
  <div id="fallback" class="text-center bold text-m">
    Does not support hotspots!
  </div>
</body>

</html>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console