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.

Quick-add: + add another resource

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.

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.

            
              @import url('https://fonts.googleapis.com/css?family=Dosis:200');
$background-pattern: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIj4KPHJlY3Qgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiIGZpbGw9IiMyNjkiPjwvcmVjdD4KPGcgZmlsbD0iIzY0OTRiNyI+CjxyZWN0IHdpZHRoPSIxMDAiIGhlaWdodD0iMSIgeT0iMjAiPjwvcmVjdD4KPHJlY3Qgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxIiB5PSI0MCI+PC9yZWN0Pgo8cmVjdCB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEiIHk9IjYwIj48L3JlY3Q+CjxyZWN0IHdpZHRoPSIxMDAiIGhlaWdodD0iMSIgeT0iODAiPjwvcmVjdD4KPHJlY3Qgd2lkdGg9IjEiIGhlaWdodD0iMTAwIiB4PSIyMCI+PC9yZWN0Pgo8cmVjdCB3aWR0aD0iMSIgaGVpZ2h0PSIxMDAiIHg9IjQwIj48L3JlY3Q+CjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEwMCIgeD0iNjAiPjwvcmVjdD4KPHJlY3Qgd2lkdGg9IjEiIGhlaWdodD0iMTAwIiB4PSI4MCI+PC9yZWN0Pgo8L2c+CjxyZWN0IHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBmaWxsPSJub25lIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iI2ZmZiI+PC9yZWN0Pgo8L3N2Zz4=";

html {
  width: 100vw;
  height: 100vh;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url($background-pattern) repeat center fixed;
  background-size: 2em 2em;
  height: 100%;
  width: 100%;
  h1 {
    color: white;
    font-family: 'Dosis';
    letter-spacing: 1.5px;
    text-shadow: 1px 1px 1px black;
  }
  &::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    display: block;
    background: rgba(255, 255, 255, .25);
  }
}

.glass {
  position: relative;
  box-sizing: border-box;
  padding: 0;
  max-height: 90%;
  max-width: 90%;
  width: 250px;
  height: 250px;
  border: 2px solid rgba(0, 0, 0, .15);
  border-radius: 25px 25px 0 25px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .25), inset 0 0 2px 0px white;
  background: rgba(0, 0, 0, .0125);
  resize: both;
  overflow: hidden;
  transition: all 200ms ease-in-out;
  animation: resize 1.5s .5s;
  &::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0; 
    right: 0;
    background: url(#{$background-pattern}) repeat center fixed;
    background-size: 2em 2em;
    filter: blur(4px);
    z-index: -1;
  }
  
  &::before {
    content: '';
    display: block;
    position: absolute;
    bottom: -10px;
    right: -10px;
    cursor: nwse-resize;
    border: 10px solid transparent;
    border-bottom: 10px solid #f06;
    transform: rotate(135deg);
  }
}

@keyframes resize {
  from {
    width: 250px; 
    height: 250px;
  }
  50% {
    width: 85%;
    height: 85%;
  }
  to {
    width: 250px; 
    height: 250px;
  }
}
            
          
!
            
              $(document).ready(function(){
  // make the box respond to resize without transorm animation
  setTimeout(function(){
    $('.glass').css({
      transition : 'initial'
    })
  }, 3201);
});
            
          
!
999px
Loading ..................

Console