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.

            
              <div class="pay-roomcard">
  <div class="machine">
    <svg viewBox="0 0 800 600">
      <g class="reader-machine"> 
        <g class="screen" fill="#002F6C">
          <path d="M533.094,317H208.975C196.679,317,187,306.306,187,294.009v7.804c0,12.296,9.679,23.188,21.975,23.188H214
            v246h6V325h303v246h5V325h5.094C545.391,325,556,314.108,556,301.813v-7.804C556,306.306,545.391,317,533.094,317z"/>
          <path d="M556,52.301C556,39.984,546.016,30,533.699,30H209.301C196.984,30,187,39.984,187,52.301v239.398
            c0,12.316,9.984,22.301,22.301,22.301h324.398c12.316,0,22.301-9.984,22.301-22.301V52.301z M527,285H214V58h313V285z
             M541.088,179.747c-4.849,0-8.779-3.931-8.779-8.779c0-4.849,3.931-8.779,8.779-8.779s8.779,3.931,8.779,8.779
            C549.867,175.816,545.937,179.747,541.088,179.747z"/>
        </g>
        <g class="swiper" fill="#002F6C">
          <polygon points="575.879,186 559,186 559,285 580,285 580,218.765"/>
          <polygon points="596.038,186 591,218.765 591,285 613,285 613,186"/>
        </g>
        <g class="printer" fill="#002F6C">
          <path d="M426.667,542H315.402c-6.795,0-12.323-5.673-12.323-12.468c0-6.86,5.528-12.532,12.323-12.532h111.265
            c6.795,0,12.323,5.672,12.323,12.469C438.99,536.327,433.462,542,426.667,542z M315.402,523c-3.568,0-6.472,2.9-6.472,6.469
            c0,3.631,2.903,6.531,6.472,6.531h111.265c3.568,0,6.472-2.9,6.472-6.469c0-3.631-2.903-6.531-6.472-6.531H315.402z"/>
        </g>
        <g class="reader" fill="#E35205">
          <path d="M371.252,486.688c-35.721,0-65.094-27.704-67.759-62.754c-0.131,1.717-0.197,3.452-0.197,5.203
            c0,37.471,30.485,67.955,67.956,67.955s67.956-30.484,67.956-67.955c0-1.751-0.066-3.486-0.197-5.203
            C436.345,458.983,406.973,486.688,371.252,486.688z"/>
          <path d="M371.252,347.523c-37.471,0-67.956,30.486-67.956,67.957c0,37.47,30.485,67.955,67.956,67.955
            s67.956-30.485,67.956-67.955C439.208,378.01,408.723,347.523,371.252,347.523z"/>
        </g> 
      </g>
      <g class="arrow" fill="#ffffff">
        <polygon points="50,13.591 24,13.591 24,38.591 50,38.591 50,52.014 76.008,26.007 50,0"/>
        <rect x="12" y="13.591" width="9" height="25"/>
        <rect y="13.591" width="8" height="25"/>
      </g>
      
      <g class="roomcard" x="120" y="120">
        <path fill="#E5E6E5" d="M42.8,53.3v735.2c0,29.5,23.8,53.3,53.3,53.3H542c29.5,0,53.3-23.8,53.3-53.3V53.3 C595.3,23.8,571.5,0,542,0H96.1C66.6,0,42.8,23.8,42.8,53.3z"/>
        <path fill="#F1F1F1" d="M42.8,53.3v735.2c0,29.5,23.8,53.3,53.3,53.3h6.8L595.3,54.5v-1.1c0-29.5-23.8-53.3-53.3-53.3H96.1 C66.6,0,42.8,23.8,42.8,53.3z"/>
        <path fill="#14487F" d="M321.9,289.3h198.5V90.8H321.9V289.3z"/>
        <path fill="#A2CBDF" d="M316.2,90.8H117.6v197.4h198.6V90.8z"/>
        <polygon fill="#14487F" points="383.1,720.5 319.6,785.2 254.9,720.5"/>
        <path fill="#14487F" d="M147.7,490.6c-10.1,0-18.1-1.8-22.4-3.7c-0.5-0.2-0.6-0.5-0.5-0.9l0.5-1.2c0.1-0.4,0.4-0.6,1-0.4 c4.4,1.8,12.2,3.4,21.4,3.4c16.3,0,24.8-7.8,24.8-18.6c0-14.4-12.2-18.5-24.2-23.6c-11.5-4.9-22.4-8.8-22.4-23.5 c0-11.1,7.2-19.7,25.8-19.7c9,0,14.8,1.6,19.1,3.4c0.5,0.2,0.6,0.5,0.5,0.9l-0.5,1.2c-0.1,0.4-0.4,0.6-1,0.4 c-4.4-1.8-10-3.2-18.1-3.2c-17,0-23,7.5-23,17c0,13.6,9.7,16.3,20.9,21.1c12.2,5.3,25.7,9.9,25.7,25.9 C175.3,481.6,166,490.6,147.7,490.6z"/>
        <path fill="#14487F" d="M183.6,404.5c0-0.5,0.2-0.7,0.7-0.7h52.4c0.5,0,0.7,0.2,0.7,0.7v1.2c0,0.5-0.2,0.7-0.7,0.7h-24.8v82.1 c0,0.5-0.2,0.7-0.7,0.7h-1.3c-0.5,0-0.7-0.2-0.7-0.7v-82.1h-24.8c-0.5,0-0.7-0.2-0.7-0.7L183.6,404.5L183.6,404.5z"/>
        <path fill="#14487F" d="M270.7,403.8c0.6,0,0.7,0.2,1,0.7l33.1,84.1c0.1,0.4,0,0.7-0.5,0.7h-1.7c-0.5,0-0.7-0.2-0.9-0.6L291.4,462 h-42.5l-10.4,26.8c-0.1,0.4-0.4,0.6-0.9,0.6h-1.7c-0.5,0-0.6-0.4-0.5-0.7l33.1-84.1c0.2-0.5,0.4-0.7,1-0.7L270.7,403.8 L270.7,403.8z M290.4,459.3L270.2,408H270l-20.2,51.3H290.4z"/>
        <path fill="#14487F" d="M333.5,488.6c0,0.5-0.2,0.7-0.7,0.7h-1.3c-0.5,0-0.7-0.2-0.7-0.7v-32l-30.4-52c-0.2-0.4-0.1-0.9,0.5-0.9 h1.5c0.6,0,0.9,0.2,1.1,0.6l20.7,35.4l7.9,14.1h0.1l7.9-14.1l20.7-35.4c0.2-0.4,0.5-0.6,1.1-0.6h1.5c0.6,0,0.7,0.5,0.5,0.9
            l-30.3,51.9v32.1H333.5z"/>
        <path fill="#E75D24" d="M150.3,602.8c-10.5,0-20.2-2-25.2-4.4c-1.5-0.7-2.2-1.3-1.7-2.8l2.4-6.6c0.5-1.5,1.1-2.3,2.9-1.5 c4.5,1.8,11.7,3.5,20.3,3.5c12,0,20-4,20-12.1c0-8.6-8.8-11.9-19.2-15.9c-13-5-24.8-9.9-24.8-25.9c0-14.4,9.7-22.7,30.2-22.7 c9.9,0,17.4,1.8,22.1,3.9c1.5,0.6,2.1,1.3,1.6,2.9l-2.3,6.4c-0.5,1.3-1.2,2.1-3.2,1.3c-4.4-1.6-9.8-2.8-17.1-2.8 c-12.5,0-17.8,3.7-17.8,11.2c0,8.3,8.1,10.9,18,14.9c13.3,5.6,26,10.5,26,26.9C182.6,595.1,169.5,602.8,150.3,602.8z"/>
        <path fill="#E75D24" d="M234.9,577.6l-24-39v60.6c0,1.7-0.7,2.4-2.4,2.4h-8.2c-1.8,0-2.6-0.7-2.6-2.4v-81c0-1.7,0.7-2.4,2.6-2.4 h8.2c1.5,0,2.3,0.5,2.9,1.5l25.9,42l25.9-42c0.6-1,1.5-1.5,2.9-1.5h8.3c1.7,0,2.4,0.7,2.4,2.4v81c0,1.7-0.7,2.4-2.4,2.4h-8.3 c-1.7,0-2.4-0.7-2.4-2.4v-60.6l-24,39c-0.5,0.9-1.3,1.5-2.4,1.5S235.4,578.5,234.9,577.6z"/>
        <path fill="#E75D24" d="M333.7,515.8c2.1,0,2.4,0.9,3.1,2.4l29.6,80.8c0.6,1.5-0.2,2.7-1.8,2.7h-9.2c-1.7,0-2.3-0.7-2.9-2.2 l-6.7-18.5h-35l-6.8,18.5c-0.5,1.5-1.1,2.2-2.7,2.2H292c-1.7,0-2.4-1.2-2-2.7l29.7-80.8c0.6-1.6,1.1-2.4,3.2-2.4H333.7z M342.2,569.3l-13.8-40.2h-0.2l-13.9,40.2H342.2z"/>
        <path fill="#E75D24" d="M408.2,515.8c23.7,0,35.1,8.7,35.1,28.2c0,15.6-8.7,23.8-23.1,26.2l23.1,28.4c1.1,1.3,0.6,3.2-1.5,3.2 h-9.3c-2,0-2.7-0.7-3.7-2l-22.4-27.9h-13.3v27.4c0,1.7-0.9,2.4-2.6,2.4h-8.3c-1.8,0-2.6-0.7-2.6-2.4v-81c0-1.7,0.7-2.4,2.6-2.4h26 V515.8z M407.7,560.1c16.4,0,22.1-5.1,22.1-16.1c0-11.7-6.4-16.4-21.9-16.4H393v32.5H407.7z"/>
        <path fill="#E75D24" d="M452.3,518.2c0-1.7,0.9-2.4,2.4-2.4h56c1.8,0,2.6,0.7,2.6,2.4v7.3c0,1.6-0.7,2.4-2.6,2.4h-21.1v71.3 c0,1.7-0.7,2.4-2.6,2.4h-8.4c-1.6,0-2.4-0.7-2.4-2.4V528h-21.3c-1.7,0-2.6-0.9-2.6-2.4V518.2z"/>
      </g>
    </svg>
  </div>
  <div class="title">Tap your room keycard<br>to charge $19.90 to your room</div>
</div>
            
          
!
            
              body {
  font-family: arial, san-serif;
  background: #a4c8e1;
}

.pay-roomcard {
  width: 300px;
  background: #a4c8e1;
  margin: -10px -150px;
  overflow: hidden;
  cursor: pointer;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateY(-50%);
}

.reader-machine {
  opacity: 0;
  transform: translate(-650px, 0);
  transition: all .3s ease;
}

.roomcard {
  width: 50px;
  transform: scale(0.3) translate(660px, 400px) rotate(0deg);
  transform-origin: 150px 150px;
  transition: all 0.6s cubic-bezier(0.90, 0.20, 0.20, 0.90);
}

.title {
  padding: 0 20px 20px;
  text-align: center;
  color: #fff;
  visibility: hidden;
}

.title:before {
  content: "Room Card";
  display: block;
  visibility: visible;
}

.arrow {
  opacity: 0;
  transform: translate(-115px, 370px) scale(1.5);
  transition: all .3s ease-in;
  transition-delay: .3s;
}

.pay-roomcard:hover .reader-machine {
  opacity: 1;
  transform: translate(30px, 0);
}

.pay-roomcard:hover .arrow {
  opacity: 1;
  transform: translate(180px, 370px) scale(1.5);
  animation: slide 3s 1s ease infinite;
}

.pay-roomcard:hover .title {
  visibility: visible;
}

.pay-roomcard:hover .title:before {
  visibility: hidden;
}

.pay-roomcard:hover .roomcard {
  transform: scale(0.3) translate(900px, 400px) rotate(25deg);
}

@keyframes slide {
  0% {
    transform: translate(175px, 370px) scale(1.5);
  }
  34% {
    transform: translate(145px, 370px) scale(1.5);
  }
  37% {
    transform: translate(145px, 370px) scale(1.5);
  }
  100% {
    transform: translateX(175px, 370px) scale(1.5);
  }
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console