Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

HTML

              
                .grid #[span VIN]VENTORY
  - for (var s = 1; s<11; s++){
    div(class="lines line-"+s)
  -}
  .grid-fore-side
  .grid-fore-bottom
  .red-shadow
  .red-wine
  .red-bottle
    .red-bot
    .red-shoulder
      .red-neck
        .red-opening
  .white-shadow
  .white-wine
  .white-bottle
    .white-bot
    .white-shoulder
      .white-neck
        .white-opening
  .bubbly-shadow
  .bubbly-wine
    - for (var s = 1; s<10; s++){
      div(class="bubbles bubble-a-"+s)
    -}
    - for (var s = 1; s<10; s++){
      div(class="bubbles bubble-b-"+s)
    -}
    - for (var s = 1; s<10; s++){
      div(class="bubbles bubble-c-"+s)
    -}
    - for (var s = 1; s<10; s++){
      div(class="bubbles bubble-d-"+s)
    -}
    - for (var s = 1; s<10; s++){
      div(class="bubbles bubble-e-"+s)
    -}
    - for (var s = 1; s<10; s++){
      div(class="bubbles bubble-f-"+s)
    -}
    - for (var s = 1; s<10; s++){
      div(class="bubbles bubble-g-"+s)
    -}
    - for (var s = 1; s<10; s++){
      div(class="bubbles bubble-h-"+s)
    -}
  .bubbly-bottle
    .bubbly-bot
    .bubbly-shoulder
      .bubbly-neck
        .bubbly-opening
              
            
!

CSS

              
                // colours
$bg:  #e6e9f0;

$x: red;
$wine: #7D1257;
$browndk:#5B452D;
$brownmd:#9b6a3e;
$brownlt: #fdd895;
$winewhite: rgba(87%, 88%, 74%, .9);
$winered: rgba(24%, 9%, 26%, .9);
$bubbly: rgba(91%, 65%, 67%, .9);
//shapes
$circle: 50%;
$size: 5px;

//mixins
@mixin line {
  position: absolute;
  height: 1%;
  width: 100%;
  border: solid $browndk;
  border-width: 2px 0px 0px 0px;
  background: none;
}
@mixin bottle {
  position: absolute;
  height: 50%;
  width: 20%;
  bottom: -5%;
}
@mixin bottle-bot {
  position: absolute;
  height: 10%;
  width: 100%;
  top: 100%;
  border-bottom-left-radius: $circle;
  border-bottom-right-radius: $circle;
}
@mixin bottle-shoulder {
  position: absolute;
  height: 40%;
  width: 100%;
  left: 0%;
  bottom: 100%;
  border-top-left-radius: $circle;
  border-top-right-radius: $circle;
}
@mixin bottle-neck {
  position: absolute;
  height: 100%;
  width: 30%;
  left: 35%;
  bottom: 97%;
}
@mixin bottle-opening{
  position: absolute;
  height: 10%;
  width: 110%;
  left: -5%;
  top: -6%;
  background: none;
  border-radius: $circle;
  border-width: 2px 2px 4px 2px;
}
@mixin wine {
  position: absolute;
  height: 65%;
  width: 18%;
  bottom: -7%;
}
@mixin shadow {
  position: absolute;
  height: 8%;
  width: 20%;
  bottom: -8%;
  transform-origin: bottom right;
  transform: skewX(-40deg);
  background: rgba(34%, 25%, 12%, 1);
}
@mixin bubble($w, $h, $bot, $l) {
  width: $w;
  height: $h;
  bottom: $bot;
  left: $l;
  position: absolute;border: 1px solid rgba(98%, 0%, 80%, 0.8);
  border-radius: $circle;
  background: rgba(98%, 98%, 100%, 0.8);
}

@keyframes red {
  0%   {height:65%;}
  100% {height:30%;}
}
@keyframes white {
  0%{height: 65%;}
  100%{height:20%}
}
@keyframes bubbly {
  0%{height: 65%;}
  100%{height:50%}
}
@keyframes gassy {
  0%{
    opacity: 0;
    bottom: 0%;
  }
  50%{
    opacity: 0.5;
  }
  70%{
    opacity: 0.9;
  }
  90%{
    opacity: 0.9;
    bottom: 94%;
  }
  100%{
    opacity: 0;
    bottom: 95%;}
}

html {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
*, *:before, *:after {
  -webkit-box-sizing: inherit;
  -moz-box-sizing: inherit;
  box-sizing: inherit;
  }
body{
  background: $bg;
}
span {
  color: $wine;
  font-weight: bold;
}
.grid{
  text-align: center;
  font-size: 2em;
  font-family: 'Poiret One', cursive;
  position: relative;
  margin: auto;
  display: block;
  margin-top: 5%;
  width: 600px;
  height: 400px;
  background: none;
  
  border: solid $browndk;
  border-width: 0px 0px 4px 4px;
}

.lines {
  @include line;
}

@for $i from 1 through 10{
  .#{line}-#{$i}{
  top: 0% + $i*10;}
}

.grid-fore-side {
  position: absolute;
  height: 101%;
  width: 10%;
  left: -10.5%;
  bottom: -1%;
  transform-origin: top right;
  transform: skewY(-40deg);
  background-image: linear-gradient(to left, $browndk 0%, $brownmd 100%);
}
.grid-fore-bottom {
  position: absolute;
  height: 12.5%;
  width: 100.7%;
  left: -0.6%;
  top: 101%;
  transform-origin: top left;
  transform: skewX(-50deg);
  background-image: linear-gradient(to bottom, $browndk 0%, $brownmd 100%);
}
.red-bottle {
  @include bottle;
  left: 5%;
  background: rgba(0%, 9%, 15%, 0.6);
}
.red-bot {
  @include bottle-bot;
  background: rgba(0%, 9%, 15%, 0.6);
}
.red-shoulder {
  @include bottle-shoulder;
  background: rgba(0%, 9%, 15%, 0.6);
}
.red-neck {
  @include bottle-neck;
  background: rgba(0%, 9%, 15%, 0.6);
}
.red-opening {
  @include bottle-opening;
  border: solid rgba(0%, 9%, 15%, 0.9); 
}
.red-shadow {
  @include shadow;
  left: 5%;
}
.white-bottle{
  @include bottle;
  left: 35%;
  background: rgba(61%, 75%, 38%, 0.6);
}
.white-bot {
  @include bottle-bot;
  background: rgba(61%, 75%, 38%, 0.6);
}
.white-shoulder {
  @include bottle-shoulder;
  background: rgba(61%, 75%, 38%, 0.6);
}
.white-neck {
  @include bottle-neck;
  background: rgba(61%, 75%, 38%, 0.6);
}
.white-opening {
  @include bottle-opening;
  border: solid rgba(61%, 75%, 38%, 0.9);
}
.white-shadow {
  @include shadow;
  left: 35%;
}
.bubbly-bottle{
  @include bottle;
  left: 65%;
  background: rgba(82%, 82%, 67%, 0.6);
}
.bubbly-bot {
  @include bottle-bot;
  background: rgba(82%, 82%, 67%, 0.6);
}
.bubbly-shoulder {
  @include bottle-shoulder;
  background: rgba(82%, 82%, 67%, 0.6);
}
.bubbly-neck {
  @include bottle-neck;
  background: rgba(82%, 82%, 67%, 0.6);
}
.bubbly-opening {
  @include bottle-opening;
  border: solid rgba(82%, 82%, 67%, 0.9);
}
.bubbly-shadow {
  @include shadow;
  left: 65%;
}

@for $i from 1 through 10{
  .#{bubble-a}-#{$i}{
    opacity: 0;
    animation: 8s linear 0s+$i*1 infinite gassy;
    @include bubble($size+$i*0.2, $size+$i*0.2, 1px, 10%);
    @media all and (max-width: 620px){
      @include bubble($size/2+$i*0.2, $size/2+$i*0.2, 1px, 10%);
    }
  }
}
@for $i from 1 through 10{
  .#{bubble-b}-#{$i}{
    opacity: 0;
    animation: 9s linear 0s+$i*0.5 infinite gassy;
    @include bubble($size+$i*0.5, $size+$i*0.5, 1px,20%);
    @media all and (max-width: 620px){
      @include bubble($size/2+$i*0.5, $size/2+$i*0.5, 1px, 20%);
    }
  }
}
@for $i from 1 through 10{
  .#{bubble-c}-#{$i}{
    opacity: 0;
    animation: 10s linear 0.5s+$i*0.5 infinite gassy;
    @include bubble($size+$i*0.3, $size+$i*0.3,2px,30%);
    @media all and (max-width: 620px){
      @include bubble($size/3+$i*0.3, $size/3+$i*0.3, 1px, 30%);
    }
  }
}
@for $i from 1 through 10{
  .#{bubble-d}-#{$i}{
    opacity: 0;
    animation: 8s linear 0s+$i*1 infinite gassy;
    @include bubble($size+$i*0.2, $size+$i*0.2, 1px, 50%);
  }
}
@for $i from 1 through 10{
  .#{bubble-e}-#{$i}{
    opacity: 0;
    animation: 9s linear 0s+$i*0.5 infinite gassy;
    @include bubble($size+$i*0.5, $size+$i*0.5, 1px,90%);
    @media all and (max-width: 620px){
      @include bubble($size/4+$i*0.2, $size/4+$i*0.2, 1px, 80%);
    }
  }
}
@for $i from 1 through 10{
  .#{bubble-f}-#{$i}{
    opacity: 0;
    animation: 8s linear 0.5s+$i*0.5 infinite gassy;
    @include bubble($size+$i*0.3, $size+$i*0.3,2px,64%);
    @media all and (max-width: 620px){
      @include bubble($size/5+$i*0.2, $size/5+$i*0.2, 1px, 64%);
    }
  }
}
@for $i from 1 through 10{
  .#{bubble-g}-#{$i}{
    opacity: 0;
    animation: 15s linear 0.5s+$i*0.5 infinite gassy;
    @include bubble($size+$i*0.3, $size+$i*0.3,2px,74%);
    @media all and (max-width: 620px){
      @include bubble($size/3+$i*0.2, $size/3+$i*0.2, 1px, 70%);
    }
  }
}
@for $i from 1 through 10{
  .#{bubble-h}-#{$i}{
    opacity: 0;
    animation: 6s linear 0.5s+$i*0.5 infinite gassy;
    @include bubble($size+$i*0.3, $size+$i*0.3,2px,44%);
    @media all and (max-width: 620px){
      @include bubble($size/5+$i*0.2, $size/5+$i*0.2, 1px, 10%);
    }
  }
}

.red-wine {
  @include wine;
  left: 6%;
  background: $winered;
  animation: 4s linear 2s 1 red forwards; 
}
.white-wine {
  @include wine;
  left: 36%;
  background: $winewhite;
  animation: 5s linear 3s 1 white forwards; 
}
.bubbly-wine {
  @include wine;
  left: 66%;
  background: $bubbly;
  animation: 5s linear 3s 1 bubbly forwards; 
}
@media all and (max-width: 620px) {
   .grid{
    font-size: 1em;
    margin-top: 100px;
    width: 250px;
    height: 175px;
    border-width: 0px 0px 2px 2px;
  }
  .lines {
  border-width: 2px 0px 0px 0px;
}
}
              
            
!

JS

              
                
              
            
!
999px

Console