css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <p class="head"><i class="fa fa-jsfiddle" aria-hidden="true"></i> <a href="https://getbutterfly.com/javascript/">More JavaScript tutorials and code snippets</a></p>
<div class="bounty-wrapper">
  <div class="bounty-offer" id="bounty1">
    <div class="bounty-title"><i class="fa fa-ship"></i> Bounty Title</div>
    <div class="bounty-map"><a href="#img1">View map <i class="fa fa-chevron-circle-right"></i></a></div>
    <img src="https://placeimg.com/370/135/tech" class="bounty-image" alt="">
    <div class="bounty-meta">
      <div class="bounty-hr"></div>
      <div><b>Date:</b> November 7th, 2016</div>
      <div><b>Duration:</b> 3 weeks</div>
      <div><b>Bounty Ship:</b> Queen of the Seas</div>
      <div><b>Itinerary:</b> Unknown</div>
      <div><b>Includes:</b> Breakfast, lunch and dinner</div>
      <div><b>Upgrades:</b> Oceanview cabin and balcony</div>
    </div>
    <div class="bounty-bottom">
      <div class="bounty-price"><b>Now from</b><br><span>$1,899<small>pps</small></span></div>
      <div class="bounty-call">Call <b>04555 27120</b><br><small>to speak to our bounty team</small></div>

      <a href="#" class="button toggleCallback1" onclick="return false;"><i class="fa fa-phone"></i> Request callback</a>
      <a href="#" class="button toggleQuote1" onclick="return false;"><i class="fa fa-envelope"></i> Email me this bounty</a>
    </div>

    <div class="bounty-request-callback callback1">
      <a href="#" class="button closeCallback1" onclick="return false;"><i class="fa fa-fw fa-times"></i></a>
      <h3><i class="fa fa-phone"></i> Request callback</h3>
      <form method="post">
        <p>
          <label>Your name</label>
          <input type="text" placeholder="Your name">
        </p>
        <p>
          <label>Your phone number</label>
          <input type="text" placeholder="Your phone number">
        </p>
        <p>
          <label>Preferred contact time</label>
          <select>
            <option value="">Select...</option>
            <option>10:30am to 13:00pm</option>
            <option>1:15pm to 3:30pm</option>
            <option>3:30pm to 5:15pm</option>
          </select>
        </p>
        <p>
          <input type="submit" name="requestCallback" class="button" value="Request callback">
        </p>
      </form>
    </div>
    <div class="bounty-request-quote quote1">
      <a href="#" class="button closeQuote1" onclick="return false;"><i class="fa fa-fw fa-times"></i></a>
      <h3><i class="fa fa-envelope"></i> Email me this bounty</h3>
      <form method="post">
        <p>
          <label>Name</label>
          <input type="text" placeholder="Your name">
        </p>
        <p>
          <label>Email address</label>
          <input type="text" placeholder="Your email address">
        </p>
        <p><input type="checkbox"> Add a message?</p>
        <div class="hideme">
          <p>
            <label>From (add your name)</label>
            <input type="text" placeholder="From">
          </p>
          <p>
            <label>Message</label>
            <textarea rows="3"></textarea>
          </p>
        </div>
        <p>
          <input type="submit" name="requestQuote" class="button" value="Send">
        </p>
      </form>
    </div>
    <a href="#_" class="lightbox" id="img1"><img src="http://placehold.it/800x600"></a>
  </div>


  <div class="bounty-offer" id="bounty2">
    <div class="bounty-title"><i class="fa fa-ship"></i> Bounty Title</div>
    <div class="bounty-map"><a href="#img2">View map <i class="fa fa-chevron-circle-right"></i></a></div>
    <img src="https://placeimg.com/370/135/arch" class="bounty-image" alt="">
    <div class="bounty-meta">
      <div class="bounty-hr"></div>
      <div><b>Date:</b> November 7th, 2016</div>
      <div><b>Duration:</b> 3 weeks</div>
      <div><b>Bounty Ship:</b> Queen of the Seas</div>
      <div><b>Itinerary:</b> Unknown</div>
      <div><b>Includes:</b> Breakfast, lunch and dinner</div>
      <div><b>Upgrades:</b> Oceanview cabin and balcony</div>
    </div>
    <div class="bounty-bottom">
      <div class="bounty-price"><b>Now from</b><br><span>$1,899<small>pps</small></span></div>
      <div class="bounty-call">Call <b>04555 27120</b><br><small>to speak to our bounty team</small></div>

      <a href="#" class="button toggleCallback2" onclick="return false;"><i class="fa fa-phone"></i> Request callback</a>
      <a href="#" class="button toggleQuote2" onclick="return false;"><i class="fa fa-envelope"></i> Email me this bounty</a>
    </div>

    <div class="bounty-request-callback callback2">
      <a href="#" class="button closeCallback2" onclick="return false;"><i class="fa fa-fw fa-times"></i></a>
      <h3><i class="fa fa-phone"></i> Request callback</h3>
      <form method="post">
        <p>
          <label>Your name</label>
          <input type="text" placeholder="Your name">
        </p>
        <p>
          <label>Your phone number</label>
          <input type="text" placeholder="Your phone number">
        </p>
        <p>
          <label>Preferred contact time</label>
          <select>
            <option value="">Select...</option>
            <option>10:30am to 13:00pm</option>
            <option>1:15pm to 3:30pm</option>
            <option>3:30pm to 5:15pm</option>
          </select>
        </p>
        <p>
          <input type="submit" name="requestCallback" class="button" value="Request callback">
        </p>
      </form>
    </div>
    <div class="bounty-request-quote quote2">
      <a href="#" class="button closeQuote2" onclick="return false;"><i class="fa fa-fw fa-times"></i></a>
      <h3><i class="fa fa-envelope"></i> Email me this bounty</h3>
      <form method="post">
        <p>
          <label>Name</label>
          <input type="text" placeholder="Your name">
        </p>
        <p>
          <label>Email address</label>
          <input type="text" placeholder="Your email address">
        </p>
        <p><input type="checkbox"> Add a message?</p>
        <div class="hideme">
          <p>
            <label>From (add your name)</label>
            <input type="text" placeholder="From">
          </p>
          <p>
            <label>Message</label>
            <textarea rows="3"></textarea>
          </p>
        </div>
        <p>
          <input type="submit" name="requestQuote" class="button" value="Send">
        </p>
      </form>
    </div>
    <a href="#_" class="lightbox" id="img2"><img src="http://placehold.it/800x600"></a>
  </div>


  <div class="bounty-offer" id="bounty3">
    <div class="bounty-title"><i class="fa fa-ship"></i> Bounty Title</div>
    <div class="bounty-map"><a href="#img3">View map <i class="fa fa-chevron-circle-right"></i></a></div>
    <img src="https://placeimg.com/370/135/nature" class="bounty-image" alt="">
    <div class="bounty-meta">
      <div class="bounty-hr"></div>
      <div><b>Date:</b> November 7th, 2016</div>
      <div><b>Duration:</b> 3 weeks</div>
      <div><b>Bounty Ship:</b> Queen of the Seas</div>
      <div><b>Itinerary:</b> Unknown</div>
      <div><b>Includes:</b> Breakfast, lunch and dinner</div>
      <div><b>Upgrades:</b> Oceanview cabin and balcony</div>
    </div>
    <div class="bounty-bottom">
      <div class="bounty-price"><b>Now from</b><br><span>$1,899<small>pps</small></span></div>
      <div class="bounty-call">Call <b>04555 27120</b><br><small>to speak to our bounty team</small></div>

      <a href="#" class="button toggleCallback3" onclick="return false;"><i class="fa fa-phone"></i> Request callback</a>
      <a href="#" class="button toggleQuote3" onclick="return false;"><i class="fa fa-envelope"></i> Email me this bounty</a>
    </div>

    <div class="bounty-request-callback callback3">
      <a href="#" class="button closeCallback3" onclick="return false;"><i class="fa fa-fw fa-times"></i></a>
      <h3><i class="fa fa-phone"></i> Request callback</h3>
      <form method="post">
        <p>
          <label>Your name</label>
          <input type="text" placeholder="Your name">
        </p>
        <p>
          <label>Your phone number</label>
          <input type="text" placeholder="Your phone number">
        </p>
        <p>
          <label>Preferred contact time</label>
          <select>
            <option value="">Select...</option>
            <option>10:30am to 13:00pm</option>
            <option>1:15pm to 3:30pm</option>
            <option>3:30pm to 5:15pm</option>
          </select>
        </p>
        <p>
          <input type="submit" name="requestCallback" class="button" value="Request callback">
        </p>
      </form>
    </div>
    <div class="bounty-request-quote quote3">
      <a href="#" class="button closeQuote3" onclick="return false;"><i class="fa fa-fw fa-times"></i></a>
      <h3><i class="fa fa-envelope"></i> Email me this bounty</h3>
      <form method="post">
        <p>
          <label>Name</label>
          <input type="text" placeholder="Your name">
        </p>
        <p>
          <label>Email address</label>
          <input type="text" placeholder="Your email address">
        </p>
        <p><input type="checkbox"> Add a message?</p>
        <div class="hideme">
          <p>
            <label>From (add your name)</label>
            <input type="text" placeholder="From">
          </p>
          <p>
            <label>Message</label>
            <textarea rows="3"></textarea>
          </p>
        </div>
        <p>
          <input type="submit" name="requestQuote" class="button" value="Send">
        </p>
      </form>
    </div>
    <a href="#_" class="lightbox" id="img3"><img src="http://placehold.it/800x600"></a>
  </div>
  <div class="clearfix"></div>
</div>
            
          
!
            
              body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 14px;
  line-height: 1.5;
}
.head {
  text-align: center;
  color: #2C3E50;
}
.head a {
  color: #2C3E50;
}

.bounty-wrapper {
  background-color: #2C3E50;
  padding: 40px;
  margin: 0;
}

.bounty-wrapper * {
  box-sizing: border-box;
}

.bounty-wrapper .bounty-offer {
  border-radius: 4px;
  margin: 0 78px 56px 0;
  position: relative;
  padding: 0 0 8px 0;
  width: 370px;
  height: 600px;
  float: left;
  background-color: #f1f1f1;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.bounty-wrapper .bounty-offer:nth-child(n+3) {
  margin-right: 0;
}

.bounty-wrapper .bounty-offer .bounty-title {
  text-transform: uppercase;
  background-color: #34495E;
  padding: 8px 10px;
  color: #ffffff;
}

.bounty-wrapper .bounty-offer .bounty-map {
  background-color: #3498DB;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 14px;
}

.bounty-wrapper .bounty-offer .bounty-map a {
  color: #ffffff;
}

.bounty-wrapper .bounty-offer .bounty-map .fa {
  float: right;
}

.bounty-wrapper .bounty-offer .bounty-hr {
  width: 60%;
  border-bottom: 1px solid #cccccc;
  margin: 4px 0 4px 0;
}

.bounty-wrapper .bounty-offer .bounty-meta,
.bounty-wrapper .bounty-offer .bounty-price {
  font-size: 14px;
  line-height: 1.3;
}

.bounty-wrapper .bounty-offer .bounty-price span {
  font-size: 32px;
  font-weight: bold;
  color: #3498DB;
}

.bounty-wrapper .bounty-offer .bounty-price span small {
  font-size: 12px;
}

.bounty-wrapper .bounty-offer .bounty-call {
  font-size: 24px;
  border-bottom: 1px dotted #cccccc;
  margin: 4px 0 8px 0;
  padding: 0 0 4px 0;
}

.bounty-wrapper .bounty-offer .bounty-call small {
  font-size: 18px;
  line-height: 1;
}

.bounty-wrapper .bounty-offer .button {
  display: inline-block;
  background-color: #34495E;
  color: #ffffff;
  border-radius: 4px;
  padding: 8px 6px;
  text-decoration: none;
  cursor: pointer;
  font-size: 15px;
}

.bounty-wrapper .bounty-offer .button:hover {
  background-color: #3498DB;
}

.bounty-wrapper .bounty-offer .bounty-image {
  width: 370px;
  height: 135px;
}

.bounty-wrapper .bounty-offer .bounty-meta,
.bounty-wrapper .bounty-offer .bounty-bottom {
  margin: 0 10px;
}

.bounty-wrapper .bounty-offer .bounty-bottom {
  position: absolute;
  bottom: 10px;
  left: 0;
}

.bounty-wrapper .bounty-offer input[type="submit"] {
  border: 0 none;
  font-family: inherit;
  font-size: inherit;
}

.bounty-wrapper .bounty-offer input[type="text"],
.bounty-wrapper .bounty-offer input[type="email"],
.bounty-wrapper .bounty-offer select {
  font-family: inherit;
  font-size: inherit;
  padding: 4px;
}

.bounty-wrapper .lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  width: 100%;
  height: 100%;
  text-align: center;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.8);
}

.bounty-wrapper .lightbox {
  transition: all 500ms ease-out 1s;
}

.bounty-wrapper .lightbox img {
  max-width: 90%;
  max-height: 80%;
  margin-top: 2%;
}

.bounty-wrapper .lightbox:target {
  outline: none;
  display: block;
}


/* OVERLAYS */

.bounty-request-callback {
  -ms-transform: rotate(-10deg);
  transform: rotate(-10deg);
  margin: 0 0 0 -72px;
  opacity: 0;
  filter: alpha(opacity=0);
  z-index: -1;
  background-color: rgba(255, 255, 255, 0.9);
  position: absolute;
  top: 0;
  left: 0;
  width: 370px;
  height: 600px;
  padding: 10px;
}

.bounty-request-callback.hover {
  -ms-transform: rotate(0deg);
  transform: rotate(0deg);
  margin: 0 0 0 0;
  opacity: 1;
  filter: alpha(opacity=100);
  z-index: 1;
}

.bounty-request-callback h3 {
  margin: 32px 0;
  font-size: 18px;
  font-weight: bold;
}

.bounty-request-callback a.button {
  float: right;
}

.bounty-request-callback form p {
  margin: 0 0 16px 0;
}

.bounty-request-callback form label {
  display: block;
  margin: 0 0 4px 0;
}

.bounty-request-callback form input[type="text"],
.bounty-request-callback form input[type="email"],
.bounty-request-callback form textarea,
.bounty-request-callback form select {
  width: 100%;
}

.bounty-request-callback {
  transition: all 450ms cubic-bezier(0.680, -0.550, 0.265, 1.550);
}

.bounty-request-quote {
  -ms-transform: rotate(10deg);
  transform: rotate(10deg);
  margin: 0 0 0 72px;
  opacity: 0;
  filter: alpha(opacity=0);
  z-index: -1;
  background-color: rgba(255, 255, 255, 0.9);
  position: absolute;
  top: 0;
  left: 0;
  width: 370px;
  height: 600px;
  padding: 10px;
}

.bounty-request-quote.hover {
  -ms-transform: rotate(0deg);
  transform: rotate(0deg);
  margin: 0 0 0 0;
  opacity: 1;
  filter: alpha(opacity=100);
  z-index: 1;
}

.bounty-request-quote h3 {
  margin: 32px 0;
  font-size: 18px;
  font-weight: bold;
}

.bounty-request-quote a.button {
  float: right;
}

.bounty-request-quote form p {
  margin: 0 0 16px 0;
}

.bounty-request-quote form label {
  display: block;
  margin: 0 0 4px 0;
}

.bounty-request-quote form input[type="text"],
.bounty-request-quote form input[type="email"],
.bounty-request-quote form textarea,
.bounty-request-quote form select {
  width: 100%;
}

.bounty-request-quote {
  transition: all 450ms cubic-bezier(0.680, -0.550, 0.265, 1.550);
}

.clearfix {
  clear: both;
}

@media screen and (max-width: 480px) {
  .bounty-wrapper {
    width: 90%;
  }
  .bounty-wrapper .bounty-offer {
    width: 100%;
    height: 700px;
  }
  .bounty-wrapper .bounty-offer .bounty-image {
    width: 100%;
    height: auto;
  }
  .bounty-wrapper .bounty-offer .bounty-bottom .button {
    width: 100%;
    margin: 0 0 10px 0;
    padding: 14px 14px;
  }
  .bounty-request-callback {
    width: 100%;
    height: 600px;
  }
  .bounty-request-quote {
    width: 100%;
    height: 600px;
  }
}
            
          
!
            
              (function() {
  /* button 1 */
  var toggleBtn1 = document.querySelector('.toggleCallback1'),
    closeBtn1 = document.querySelector('.closeCallback1'),
    flipContainer1 = document.querySelector('.callback1');

  var toggleQuoteBtn1 = document.querySelector('.toggleQuote1'),
    closeQuoteBtn1 = document.querySelector('.closeQuote1'),
    quoteContainer1 = document.querySelector('.quote1');

  toggleBtn1.addEventListener('click', function() {
    flipContainer1.classList.toggle('hover');
  });
  closeBtn1.addEventListener('click', function() {
    flipContainer1.classList.toggle('hover');
  });
  toggleQuoteBtn1.addEventListener('click', function() {
    quoteContainer1.classList.toggle('hover');
  });
  closeQuoteBtn1.addEventListener('click', function() {
    quoteContainer1.classList.toggle('hover');
  });

  /* button 2 */
  var toggleBtn2 = document.querySelector('.toggleCallback2'),
    closeBtn2 = document.querySelector('.closeCallback2'),
    flipContainer2 = document.querySelector('.callback2');

  var toggleQuoteBtn2 = document.querySelector('.toggleQuote2'),
    closeQuoteBtn2 = document.querySelector('.closeQuote2'),
    quoteContainer2 = document.querySelector('.quote2');

  toggleBtn2.addEventListener('click', function() {
    flipContainer2.classList.toggle('hover');
  });
  closeBtn2.addEventListener('click', function() {
    flipContainer2.classList.toggle('hover');
  });
  toggleQuoteBtn2.addEventListener('click', function() {
    quoteContainer2.classList.toggle('hover');
  });
  closeQuoteBtn2.addEventListener('click', function() {
    quoteContainer2.classList.toggle('hover');
  });
  /* button 3 */
  var toggleBtn3 = document.querySelector('.toggleCallback3'),
    closeBtn3 = document.querySelector('.closeCallback3'),
    flipContainer3 = document.querySelector('.callback3');

  var toggleQuoteBtn3 = document.querySelector('.toggleQuote3'),
    closeQuoteBtn3 = document.querySelector('.closeQuote3'),
    quoteContainer3 = document.querySelector('.quote3');

  toggleBtn3.addEventListener('click', function() {
    flipContainer3.classList.toggle('hover');
  });
  closeBtn3.addEventListener('click', function() {
    flipContainer3.classList.toggle('hover');
  });
  toggleQuoteBtn3.addEventListener('click', function() {
    quoteContainer3.classList.toggle('hover');
  });
  closeQuoteBtn3.addEventListener('click', function() {
    quoteContainer3.classList.toggle('hover');
  });
})();
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console