Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

HTML

              
                <div class="wrapper">
   <!-- SUITCASE -->
  <div class="suitcase">
    <div class="handle"></div>
    <div class="suitcase-head"></div>
  </div>
  <!-- GLASSES -->
  <div class="glasses">
    <div class="glass"></div>
    <div class="glass right"></div>
  </div>
  <!-- PICTURE -->
  <div class="picture">
    <div class="boat"></div>
    <div class="clouds"></div>
  </div>
 

  <!-- CAMERA -->
  <div class="camera-wrapper">
    <div class="camera">
      <div class="lens"></div>
    </div>
    <div class="camera-handle"></div>
  </div>

  <!-- FTLYING TICKET -->
  <div class="flying-ticket">
    <div class="svg-airplain">
        <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 510 510" style="enable-background:new 0 0 510 510;" xml:space="preserve">
  <g>
    <g id="flights">
      <path d="M510,255c0-20.4-17.85-38.25-38.25-38.25H331.5L204,12.75h-51l63.75,204H76.5l-38.25-51H0L25.5,255L0,344.25h38.25
        l38.25-51h140.25l-63.75,204h51l127.5-204h140.25C492.15,293.25,510,275.4,510,255z"/>
    </g>
  </g>
  </svg>
</div>
  </div>
  <!-- TOUR BOOK-->
  <div class="tour-book">
    <div class="svg-world">
        <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 58 58" style="enable-background:new 0 0 58 58;" xml:space="preserve">
<path d="M50.688,48.222C55.232,43.101,58,36.369,58,29c0-7.667-2.996-14.643-7.872-19.834c0,0,0-0.001,0-0.001  c-0.004-0.006-0.01-0.008-0.013-0.013c-5.079-5.399-12.195-8.855-20.11-9.126l-0.001-0.001L29.439,0.01C29.293,0.005,29.147,0,29,0  s-0.293,0.005-0.439,0.01l-0.563,0.015l-0.001,0.001c-7.915,0.271-15.031,3.727-20.11,9.126c-0.004,0.005-0.01,0.007-0.013,0.013  c0,0,0,0.001-0.001,0.002C2.996,14.357,0,21.333,0,29c0,7.369,2.768,14.101,7.312,19.222c0.006,0.009,0.006,0.019,0.013,0.028  c0.018,0.025,0.044,0.037,0.063,0.06c5.106,5.708,12.432,9.385,20.608,9.665l0.001,0.001l0.563,0.015C28.707,57.995,28.853,58,29,58  s0.293-0.005,0.439-0.01l0.563-0.015l0.001-0.001c8.185-0.281,15.519-3.965,20.625-9.685c0.013-0.017,0.034-0.022,0.046-0.04  C50.682,48.241,50.682,48.231,50.688,48.222z M2.025,30h12.003c0.113,4.239,0.941,8.358,2.415,12.217  c-2.844,1.029-5.563,2.409-8.111,4.131C4.585,41.891,2.253,36.21,2.025,30z M8.878,11.023c2.488,1.618,5.137,2.914,7.9,3.882  C15.086,19.012,14.15,23.44,14.028,28H2.025C2.264,21.493,4.812,15.568,8.878,11.023z M55.975,28H43.972  c-0.122-4.56-1.058-8.988-2.75-13.095c2.763-0.968,5.412-2.264,7.9-3.882C53.188,15.568,55.736,21.493,55.975,28z M28,14.963  c-2.891-0.082-5.729-0.513-8.471-1.283C21.556,9.522,24.418,5.769,28,2.644V14.963z M28,16.963V28H16.028  c0.123-4.348,1.035-8.565,2.666-12.475C21.7,16.396,24.821,16.878,28,16.963z M30,16.963c3.179-0.085,6.3-0.566,9.307-1.438  c1.631,3.91,2.543,8.127,2.666,12.475H30V16.963z M30,14.963V2.644c3.582,3.125,6.444,6.878,8.471,11.036  C35.729,14.45,32.891,14.881,30,14.963z M40.409,13.072c-1.921-4.025-4.587-7.692-7.888-10.835  c5.856,0.766,11.125,3.414,15.183,7.318C45.4,11.017,42.956,12.193,40.409,13.072z M17.591,13.072  c-2.547-0.879-4.991-2.055-7.294-3.517c4.057-3.904,9.327-6.552,15.183-7.318C22.178,5.38,19.512,9.047,17.591,13.072z M16.028,30  H28v10.038c-3.307,0.088-6.547,0.604-9.661,1.541C16.932,37.924,16.141,34.019,16.028,30z M28,42.038v13.318  c-3.834-3.345-6.84-7.409-8.884-11.917C21.983,42.594,24.961,42.124,28,42.038z M30,55.356V42.038  c3.039,0.085,6.017,0.556,8.884,1.4C36.84,47.947,33.834,52.011,30,55.356z M30,40.038V30h11.972  c-0.113,4.019-0.904,7.924-2.312,11.58C36.547,40.642,33.307,40.126,30,40.038z M43.972,30h12.003  c-0.228,6.21-2.559,11.891-6.307,16.348c-2.548-1.722-5.267-3.102-8.111-4.131C43.032,38.358,43.859,34.239,43.972,30z   M9.691,47.846c2.366-1.572,4.885-2.836,7.517-3.781c1.945,4.36,4.737,8.333,8.271,11.698C19.328,54.958,13.823,52.078,9.691,47.846  z M32.521,55.763c3.534-3.364,6.326-7.337,8.271-11.698c2.632,0.945,5.15,2.209,7.517,3.781  C44.177,52.078,38.672,54.958,32.521,55.763z" fill="#FFFFFF"/>
</div>
  </div>
<!-- COMPASS -->
    <div class="compass">
      <div class="hand"></div>
      <div class="compass-handle"></div>
    </div>
    
    <!-- AIR BALLOON -->
    <div class="air-balloon-wrapper">
    <div class="air-balloon">
      <div class="basket"></div>
      <div class="lines"></div>
    </div>
        </div>
  <!-- WRAPPER END -->
</div>


  <!-- SVG CREDIT -->
  <div class="credit">
<div class="credit of icon svg">Icons made by <a href="https://www.flaticon.com/authors/google" title="Google">Google</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0"
    target="_blank">CC 3.0 BY</a></div>
  <!-- image credit -->
  <a href="http://www.freepik.com/free-vector/background-of-various-travel-elements-with-message_1042524.htm#term=background of various travel elements with message&page=1&position=0">Based on vector  Freepik</a>
    </div>
              
            
!

CSS

              
                /*  VARIABLES  */
:root {
  /*colors:*/
  --very-dark-pink: #b2184e;
  --dark-pink: #ca325b;
  --pink: #e55171;
  --orange: #f68f19;
  --yellow: #fcbb21;
  --dark-blue: #139da7;
  --light-blue: #bfe1e0;
  --very-dark-blue: #125f73;
  --dark-blue-gray: #037781;
  --shadow-blue: rgba(6,117,128,0.2);
  --white: #fff;
  /*gradiant*/
  --gradientAngle: 135deg;
  --gradientStart: var(--orange);
  --gradientStop: var(--yellow);
  --size: 1px;
}
/* mixin*/
@mixin pseudo {
  content: "";
  position: absolute;
}
@mixin element {
  transform: rotate(-20deg);
  filter: drop-shadow(12px 12px 0 var(--shadow-blue));
}

/*  GENERAL  */
body {
  min-height: 700px;
  background-color: var(--light-blue);
}
.wrapper {
  position: relative;
  --size: 626px;
  width: var(--size);
  height: var(--size);
  background-image: url(http://www.rachelbt.co.il/wp-content/uploads/2017/07/background-1.jpg);
  border: 1px solid #aaa;
  margin: 10px;
  overflow: hidden;
}
/*positioning almost all the divs to absolute:*/
.wrapper div:not(.glass):not(.camera) {
  position: absolute;
}
.credit{
  --size: 626px;
   width: var(--size);
  text-align: center;
  font-size: 1em;
  line-height: 1.4;
}

/*  SUITCASE  */
.suitcase {
  top: -19px;
  right: 7px;
  width: 184px;
  padding-bottom: 132px;
  margin-top: 90px;
  background-color: var(--pink);
  background-image: linear-gradient(
    to left,
    var(--dark-pink) 50%,
    var(--pink) 50%
  );
  border-radius: 15px;
  @include element;
  &:after, &:before {
    @include pseudo;
    bottom: -3px;
    left: -3px;
    width: 40px;
    height: 40px;
    background-color: var(--very-dark-pink);
    border-radius: 0 100px 0 40px;
  }
  &:after {
    left: auto;
    right: -3px;
    border-radius: 100px 0 40px 0;
  }
}
.handle {
  top: -45px;
  left: 50%;
  transform: translate(-50%, 0);
  width: 38%;
  padding-bottom: 20%;
  background-color: transparent;
  border: 13px solid var(--yellow);
  border-radius: 20px;
}
.suitcase-head {
  top: -6px;
  left: 50%;
  transform: translate(-50%, 0);
  background-color: inherit;
  width: 70%;
  padding-bottom: 30%;
  border-radius: 0 0 40px 40px;
  box-shadow: 5px 6px 0 0 var(--very-dark-pink),
    -5px 6px 0 0 var(--very-dark-pink);
  z-index: 1;
  &:before {
    @include pseudo;
    top: -10px;
    left: inherit;
    width: 100%;
    background-color: inherit;
    padding-bottom: 20px;
    border-radius: 10px 10px 0 0;
    transform: inherit;
  }
  &:after {
    @include pseudo;
    top: 50px;
    left: inherit;
    transform: inherit;
    width: 60px;
    background-color: var(--yellow);
    padding-bottom: 18px;
    box-shadow: 0 7px 0 var(--very-dark-pink);
  }
}

/*  SUN GLASSES  */
.glasses {
  top: 291px;
  right: 64px;
  width: 80px;
  display: flex;
  justify-content: space-between;
  @include element;
  transform: rotate(20deg);
  &:after {
    @include pseudo;
    width: 100%;
    padding-bottom: 15%;
    background-color: var(--dark-pink);
    z-index: -1;
    top: 8px;
  }
}
.glass {
  position: relative;
  --size: 30px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background-color: var(--dark-pink);
  background-image: linear-gradient(
    var(--gradientAngle),
    var(--gradientStart) 0%,
    var(--gradientStart) 30%,
    var(--gradientStop) 30%,
    var(--gradientStop) 50%,
    var(--gradientStart) 50%,
    var(--gradientStart) 60%,
    var(--gradientStop) 60%,
    var(--gradientStop) 70%,
    var(--gradientStart) 70%,
    var(--gradientStart) 100%
  );
  box-shadow: 0 0 0 8px #cb325e;
  &:after {
    @include pseudo;
    width: 100%;
    height: 57%;
    top: -8px;
    right: 14px;
    background-color: inherit;
    border-radius: 10% 30% 0 80%;
    z-index: -1;
  }
}
.glass.right:after {
  border-radius: 0 10% 80%;
  right: auto;
  left: 14px;
}

/*  POSTCARD  */
.picture {
  top: 407px;
  left: 13px;
  background-color: var(--pink);
  width: 100px;
  padding-bottom: 120px;
  margin-top: 70px;
  border: 10px solid #fff;
  box-shadow: inset 0 -30px 0 0 var(--dark-blue);
  @include element;
}
.boat {
  /*another option for trapezoid
   bottom: 26px;
  left: 20px;
  width: 60px;
  padding-bottom: 26px;
  transform: perspective(70px) rotateX(-40deg);
  background-color: var(--dark-pink);*/
  width: 36px;
  bottom: 30px;
  left: 20px;
  border-top: 16px solid var(--dark-pink);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  &:before {
    @include pseudo;
    top: -46px;
    left: 18px;
    z-index: 1;
    width: 0;
    height: 0;
    border: 0 solid transparent;
    border-bottom-width: 16px;
    border-top-width: 14px;
    border-left: 19px solid var(--yellow);
    transform: rotate(6deg);
  }
}

.clouds {
  top: 10px;
  left: 20px;
  width: 30px;
  height: 10px;
  background-color: var(--white);
  border-radius: 20px;
  box-shadow: -7px 9px 0 var(--white);
  &:after {
    @include pseudo;
    top: 10px;
    right: -40px;
    width: 15px;
    height: 15px;
    background-color: var(--white);
    border-radius: 50%;
  }
}

/*CAMERA*/
.camera-wrapper {
  top: 223px;
  left: 52px;
  @include element;
}
.camera {
  width: 110px;
  padding-bottom: 80px;
  background-color: var(--pink);
  position: relarive;
  border-radius: 10px 10px 0 0;
  background-image: linear-gradient(
    to bottom,
    var(--white) 50%,
    var(--dark-pink) 50%,
    var(--dark-pink) 65%,
    var(--pink) 65%,
    var(--pink) 100%
  );
  z-index: 10;
  &:before {
    @include pseudo;
    display: block;
    top: -21px;
    left: 30px;
    width: 28px;
    padding-bottom: 22px;
    transform: perspective(280px) rotateX(52deg);
    border: 11px solid var(--dark-pink);
    z-index: -1;
  }

  &:after {
    @include pseudo;
    top: 8px;
    right: 8px;
    --size: 10px;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background-color: var(--dark-pink);
    z-index: 0;
  }
}

.lens {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  --size: 35px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background-color: var(--dark-pink);
  box-shadow: 0 0 0 6px var(--white), 0 0 0 12px var(--yellow);

  &:before {
    /*creates the yellow strip and the camera button*/
    content: "";
    display: block;
    position: absolute;
    bottom: -15px;
    right: -30px;
    --size: 12px;
    width: var(--size);
    height: 5px;
    background-color: var(--yellow);
    box-shadow: -80px -73px 0 0 var(--pink), -80px -75px 0 0 var(--pink);
    z-index: 1;
  }
  &:after {
    @include pseudo;
    display: block;
    top: 17px;
    right: 10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    color: var(--white);
    box-shadow: 0 10px 0 0,
      5px 4px 0 0,
      6px 1px 0 0,
      6px -2px 0 0,
      5px -4px 0 0,
      4px -6px 0 0;
    transform: rotate(20deg);
  }
}
/*FTLYING TICKET*/
.flying-ticket {
  top: 375px;
  left: 111px;
  width: 100px;
  height: 55px;
  background-color: var(--pink);
  border-radius: 5px;
  @include element;
  transform: rotate(30deg);

  &:before {
    @include pseudo;
    bottom: 16px;
    left: 11px;
    --size: 2px;
    width: 20px;
    height: 3px;
    /*outline: 1px solid black;*/
    color: var(--dark-pink);
    box-shadow: inset 0 4px 0 0,
      0 5px 0 0,
      20px 5px 0 0,
      0 10px 0 0,
      20px 10px 0 0,
      63px 0px 0 0,
      63px 3px 0 0,
      63px 6px 0 0,
      63px 9px 0 0;
  }
  &:after {
    @include pseudo;
    bottom: 2px;
    right: 36px;
    width: 3px;
    height: 51px;
    background-image: linear-gradient(
      to bottom,
      var(--dark-pink) 50%,
      transparent 50%
    );
    background-size: 100% 8px;
  }
}
.svg-airplain {
  top: 8px;
  left: 10px;
  width: 20px;
  height: 20px;
  fill: #fff;
}
/*TOUR BOOK*/
.tour-book {
  bottom: 87px;
  right: 258px;
  width: 80px;
  height: 100px;
  border-radius: 0 12px 12px 0;
  background-color: var(--dark-blue);
  box-shadow: inset 10px 0 0 0 var(--very-dark-blue),
    inset 18px 0 0 0 var(--dark-blue-gray),
    0 10px 0 var(--dark-blue-gray);
  @include element;
  transform: rotate(40deg);

  &:after {
    @include pseudo;
    bottom: 25px;
    left: 35px;
    width: 15px;
    height: 3px;
    color: var(--white);
    background-color: var(--white);
    border: 1px solid;
    box-shadow: 0 11px 0 0, 8px 11px 0 0;
  }
}
.svg-world {
  width: 30px;
  height: 30px;
  stroke: #fff;
  margin: 20px 0 0 30px;
}
/*COMPASS*/
.compass {
  top: 76px;
  left: 101px;
  --size: 50px;
  width: var(--size);
  height: var(--size);
  background-color: var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 10px var(--pink), 0 0 0 20px var(--dark-blue);
  transform: rotate(25deg);
  filter: drop-shadow(10px -10px 0 var(--shadow-blue));

  &:after {
    @include pseudo;
    bottom: -12px;
    left: -3px;
    width: 90px;
    height: 45px;
    border-radius: 0 0 80px 80px;
    background-color: rgba(0, 0, 0, 0.2);
    transform: rotate(-50deg);
  }
}
.hand {
  position: absolute;
  top: 9px;
  left: 12px;
  border-style: solid;
  border-width: 0 6px 20px 6px;
  border-color: transparent transparent var(--pink) transparent;
  transform: rotate(-50deg);

  &:after {
    @include pseudo;
    top: 20px;
    left: -6px;
    border-style: solid;
    border-width: 20px 6px 0 6px;
    border-color: var(--dark-blue) transparent transparent transparent;
  }
}
.compass-handle {
  top: -44px;
  right: -2px;
  width: 32px;
  height: 9px;
  border: 4px solid var(--very-dark-blue);
  border-radius: 40px;
  transform: rotate(8deg);

  &:before {
    @include pseudo;
    top: 6px;
    left: 0;
    width: 31px;
    height: 14px;
    background-color: var(--dark-blue);
    background-image: repeating-linear-gradient(
      to left,
      transparent,
      transparent 5px,
      var(--very-dark-blue) 7px,
      var(--very-dark-blue) 8px
    );
    border-radius: 30px;
    border-bottom: 2px solid var(--very-dark-blue);
  }
}

/*  AIR BALLOON  */
.air-balloon-wrapper {
  bottom: 190px;
    right: 177px;
  @include element;
}
.air-balloon {
  --size: 110px;
  width: var(--size);
  height: var(--size);
  color: var(--dark-pink);
  background-color: var(--dark-pink);
  border-radius: 50%;
  box-shadow: 0 0 0 1px;
  &:before {
    @include pseudo;
    top: 0;
    left: 17px;
    width: 70%;
    height: var(--size);
    background-color: var(--pink);
    border-radius: inherit;
  }

  &:after {
    @include pseudo;
    top: 0;
    left: 40px;
    width: 27%;
    height: var(--size);
    background-color: inherit;
    border-radius: inherit;
  }
}
.basket {
  bottom: -65px;
  left: 36px;
  --size: 40px;
  width: var(--size);
  height: var(--size);
  background-color: var(--orange);
  box-shadow: inset 0 8px 0 0;
  transform: perspective(88px) rotateX(-30deg);
  /*trying to solv antialising - not working*/
  backface-visibility: hidden;
  outline: 1px solid transparent;

  &:before {
    @include pseudo;
    top: -9px;
    left: -4px;
    width: calc(var(--size) + 8px);
    height: 13px;
    background-color: var(--yellow);
  }
}
.lines {
  top: 100px;
  left: 25px;
  --size: 60px;
  width: var(--size);
  height: calc(var(--size) / 2);
  background-image: repeating-linear-gradient(
    to left,
    var(--white),
    var(--white) 5px,
    transparent 5px,
    transparent 28px
  );
  z-index: -1;
  transform: perspective(88px) rotateX(-30deg);
  /*trying to solv antialising - not working*/
  backface-visibility: hidden;
  outline: 1px solid transparent;
}

              
            
!

JS

              
                /*for Hebrew readers: 
a post about my challenges during the process:
http://www.rachelbt.co.il/code/%d7%9e%d7%a9%d7%97%d7%a7%d7%99%d7%9d-%d7%91%d7%90%d7%a8%d7%92%d7%96-%d7%94%d7%97%d7%95%d7%9c/
.*/
              
            
!
999px

Console