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


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


                <div class="card">
  <span class="bg"></span>
  <div class="content">
    <h1>Bounce Back</h1>
    <p>Hover over the card to see the background scale.</p>
    <p>Stop hovering to see it bounce back.</p>


                body {
  font-family: arial;

  background: -webkit-linear-gradient(90deg, #83a4d4 10%, #b6fbff 90%); /* Chrome 10+, Saf5.1+ */
  background:    -moz-linear-gradient(90deg, #83a4d4 10%, #b6fbff 90%); /* FF3.6+ */
  background:     -ms-linear-gradient(90deg, #83a4d4 10%, #b6fbff 90%); /* IE10 */
  background:      -o-linear-gradient(90deg, #83a4d4 10%, #b6fbff 90%); /* Opera 11.10+ */
  background:         linear-gradient(90deg, #83a4d4 10%, #b6fbff 90%); /* W3C */    
* {
  -moz-box-sizing: border-box;
       box-sizing: border-box;

h1 {
  font-size: 26px;

.card {
  position: relative;
  width: 300px;
  margin: 50px auto;

.bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 67, 115, 0.2);

.content {
  padding: 20px 40px;


                /* jquery.js */
/* jquery.velocity.js */

$(".card").hover( function() {
  $(".bg").velocity({ scaleX : 1.04, scaleY: 1.05 }, 100);
function() {
  $(".bg").velocity({ scaleX: 1.00, scaleY: 1.00 }, 1500, [300, 10]);