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

            
              #s.search
  %svg#r{:viewbox => "0 0 3000.29 592.05", :xmlns => "http://www.w3.org/2000/svg"}
    %path#a{:d => "M2409,211.5c0,116.25,94.24,210.5,210.5,210.5a209.45,209.45,0,0,0,115.68-34.66c.55.62,1,1.31,1.55,1.9L2848,500.47A42.79,42.79,0,1,0,2908.47,440L2797.24,328.73c-.59-.59-1.28-1-1.9-1.55A209.46,209.46,0,0,0,2830,211.5C2830,95.24,2735.75,1,2619.5,1S2409,95.24,2409,211.5 M2482,211.5A137.53,137.53,0,1,1,2619.5,349,137.53,137.53,0,0,1,2482,211.5", :transform => "translate(-19 7)"}
    %rect#b{:height => "462.05", :width => "2860.29", :x => "30", :y => "30"}
  %input#input{:value => "search: arcticben.co.uk"}/
  %span
    ( click the icon )
            
          
!
            
              body
  background -webkit-linear-gradient(to left, #00d2ff , #3a7bd5)
  background linear-gradient(to left, #00d2ff , #3a7bd5)
  
 #r
  width 330px
  margin 0 auto
  cursor pointer
  
#a
  fill rgba(255, 255, 255, 0)
  stroke #fff
  stroke-width 20px
  cursor pointer
  
#a.active
  stroke #fff
  stroke-miterlimit 10
  stroke-width 40px
  
#b 
  fill none
  stroke #fff
  stroke-miterlimit 10
  stroke-width 40px
  visibility hidden
input
  position absolute
  top -55px
  left 15px
  margin 0 auto
  padding 10px
  width 260px
  background-color rgba(0, 0, 0, 0)
  color #fff
  font-family 'Dosis', sans-serif
  font-weight 800
  font-size 23px
  border none
  box-shadow none
  outline none
  opacity 1
  transition-duration 1s
  
input.on
  top 5px
  opacity 1
  
.search  
  width 330px
  height 100px
  position absolute
  top 40%
  left 0
  right 0
  overflow hidden
  margin 0 auto
  
 .search:after
   content: "\00d7"
   position absolute
   font-weight bold
   font-size 20px
   right 25px
   font-weight bold
   top -55px
   color #fff
   cursor pointer
   z-index -1
   border-radius 100%
   transition-duration 0.5s
   text-align right
   width 50px 
   height 35px
   
 .x.search:after 
   top 5px
   
span 
   color #fff
   position absolute
   bottom 0px
   left 0
   right 0
   text-align center
   font-family 'Dosis', sans-serif
   font-weight 200
   text-transform uppercase
   letter-spacing 3px
   font-size 12px
   
            
          
!
            
              var a = document.getElementById('a'),
    b = document.getElementById('b'),
    r = document.getElementById('r'),
    s = document.getElementById('s'),
    input = document.getElementById('input');

var tl = new TimelineMax({paused: true});
    tl
      .to(a, 1, {morphSVG:b, ease:Elastic.EaseOut});

r.addEventListener('click', function(){
  if(a.classList.contains('active')){
    tl.reverse();
  }
   else{
     tl.play();
  }
     a.classList.toggle('active');
     input.classList.toggle('on');
     s.classList.toggle('x');
});


            
          
!
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