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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <img id="logo"
     src="https://www.google.com/images/srpr/logo11w.png"
     height=95
     width=269 />
<div>
    <input id="search-input"/>
</div>
<div>
    <button id="search-button">Google Search</button>
    <button id="lucky-button">I'm Feeling Lucky</button>
</div>
            
          
!
            
              body {
    position: relative;
    min-width: 700px;
    text-align: center;
}

#logo {
    margin: 42px 0 19px;
}

#search-input {
    width: 566px;
    height: 26px;
    border: 1px solid #d8d8d8;
}

#search-button, #lucky-button {
    background: #f5f5f5;
    background-image: -webkit-linear-gradient(top, rgb(245, 245, 245), rgb(241, 241, 241));
    background-image: -moz-linear-gradient(50% 0%, #F5F5F5, #F1F1F1);
    border: 1px solid #dcdcdc;
    border-radius: 2px;
    color: #444;
    font: bold 11px/27px Arial, sans-serif;
    height: 29px;
    margin: 16px 6px;
    padding: 0 8px;
}

            
          
!
            
              // Overlay the mock with inverted colors
var mockUrl = 'https://dl.dropboxusercontent.com/u/42955681/blog/2014-11-30/google-mock.png';
var mock = $('<img>')
    .attr('src', mockUrl)
    .css({
        'position': 'absolute',
        'top': 0,
        'left': 0,
        'right': 0,
        'margin': 'auto',
        'z-index': 10000,
        'pointer-events': 'none',
        'filter': 'url(#invertFilter)',
        '-webkit-filter': 'url(#invertFilter)',
        //'-webkit-filter': 'invert(100%) opacity(50%)',
    })
    .appendTo('body');
$("<svg xmlns='http://www.w3.org/2000/svg'><filter id='invertFilter' color-interpolation-filters='srgb'><feColorMatrix color-interpolation-filters='srgb' in='SourceGraphic' type='matrix' values='-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 0 0.5'/></filter></svg>").appendTo('body');




// Simulate what fiddling with stuff in inspector might look like
var animateLoop = function() {
  $('#logo, #search-button, #lucky-button').css('margin', 0);
  $('#search-input').css('height', 'auto');
  
  new jQuery.Deferred().resolve()
    .then(function() {
      return $('#logo')
        .animate({
          margin: '42px 0 19px'
        }, {
          duration: 2000,
          easing: 'easeOutElastic',
        });
    })
    .then(function() {  
      return $('#search-input')
        .animate({
          height: 26,
        }, {
          duration: 2000,
          easing: 'easeOutElastic',
        });
    })
    .then(function() {  
      return $('#search-button, #lucky-button')
        .animate({
          margin: '16px 6px',
        }, {
          duration: 2000,
          easing: 'easeOutElastic',
        });
    })
    .then(function() {
      animateLoop();
    });
}
animateLoop();
            
          
!
999px
Loading ..................

Console