css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="btn">Replay</div>

<article class="b-tour">
  <div class="block-top"></div>
  <div class="b-comment">
    <svg class="b-comment--svg">
      <rect x="47" y="-45" rx="4" ry="4" width="74" height="166" />
    </svg>
    <div class="b-comment--user">
      <div></div>
      <div></div>
    </div>
    <div class="b-comment--line b-comment--line-1"></div>
    <div class="b-comment--line b-comment--line-2"></div>
    <div class="b-comment--line b-comment--line-3"></div>
    <div class="b-comment--line b-comment--line-4"></div>
    <div class="b-comment--line b-comment--line-5"></div>
    <div class="b-comment--bell">
      <div class="rotate">
        <svg viewBox="0 0 473.733 473.733" class="svg-bell">
          <path d="M22.648 398.65c2.55 6.233 8.783 10.483 15.583 10.483h123.534c5.383 36.55 37.117 64.6 74.8 64.6s69.417-28.05 74.8-64.6H435.18c.85 0 1.7 0 2.55-.283 6.234-.85 11.334-5.1 13.6-10.767 2.268-6.517.568-13.317-4.25-17.85l-.85-.85c-1.7-1.7-8.5-9.35-15.016-25.5-7.083-17.283-15.867-48.167-15.867-96.05 0-94.633-35.7-144.5-65.45-169.717-19.833-16.717-39.667-24.933-52.7-28.9-.567-11.617-3.4-27.483-14.167-40.233C275.665 10.2 261.782 0 237.132 0c-24.367 0-38.25 10.483-45.617 18.983-11.05 13.033-14.167 29.183-14.45 41.083-13.317 3.967-33.15 12.183-52.7 28.333-54.683 44.766-66.017 116.732-66.017 168.866 0 46.467-8.783 77.35-16.15 95.2-7.933 18.983-15.583 27.483-15.583 27.483-5.1 4.817-6.517 12.183-3.967 18.7zm214.2 41.083c-18.983 0-35.133-13.033-40.233-30.6h80.467c-5.1 17.567-21.25 30.6-40.234 30.6zm-144.5-182.466c0-152.433 99.733-166.883 103.7-167.45 4.533-.567 8.783-2.833 11.617-6.517 2.833-3.683 3.967-8.217 3.4-13.033-.85-5.383-1.417-21.25 6.233-30.033 1.417-1.7 5.95-7.083 19.833-7.083s18.418 5.384 20.118 7.084c7.083 8.217 6.8 23.8 5.95 28.9-.85 4.533.283 9.35 3.117 13.033 2.833 3.683 6.8 6.233 11.617 6.8.283 0 25.5 3.683 50.717 24.933 35.416 29.75 53.266 78.2 53.266 143.933 0 57.8 11.05 94.917 22.1 117.583H69.682c10.766-23.516 22.666-61.483 22.666-118.15z"/></svg>
      </div>
    </div>
  </div>
  <div class="block-bottom"></div>
  <div class="heading">Notifications</div>
  <p>We need to notify you when <br> Favorr is on it's way</p>
</article>
            
          
!
            
              =size($width: 100%, $height: $width)
  width: $width
  height: $height

*
  box-sizing: border-box

body,
html
  +size
  position: relative
  background: #3288ff

.b-tour
  +size(320px, 538px)
  position: fixed
  margin: auto
  left: 0
  right: 0
  top: 0
  bottom: 0
  background: #fff
  text-align: center
  padding-top: 80px
  box-shadow:  0 20px 50px rgba(#000, 0.4)

.btn
  user-select: none
  cursor: pointer
  position: fixed
  background: #fff
  border-radius: 20px
  padding: 0 25px
  box-shadow: 0 2px 8px rgba(#000, .30)
  top: 10px
  right: 10px
  font: 16px / 40px Arial, sans-serif
  color: #3288ff
  z-index: 2
  
  &:active
    background: mix(#fff, #3288ff, 90%)
      
.b-comment
  +size(166px, 74px)
  position: relative
  margin: 8px auto
  padding: 10px

  &--svg
    +size(168px, 78px)
    position: absolute
    top: -1px
    left: -1px

    > rect
      stroke-dasharray: 473
      stroke-dashoffset: 473
      transform: rotate(90deg) scale(-1, 1)
      transform-origin: 38px 84px
      fill: none
      stroke: #e3e3e7


  &--bell
    +size(40px)
    border-radius: 50%
    margin: auto
    background: #3288ff
    position: absolute
    z-index: 5
    top: 0
    bottom: 0
    right: -20px
    padding: 10px
    transform: scale(0)
      origin: center center

  .svg-bell
    +size(20px)
    fill: #fff
    transform: scale(0)
      origin: center top

  .rotate
    transform-origin: center top

  &--user
    +size(18px)
    background: #dbdfdf
    border-radius: 50%
    position: relative
    padding-top: 4px
    transform: scale(0)
      origin: center center


    > div
      background: #fff
      border-radius: 50%
      margin: auto

      &:first-child
        +size(8px)

      &:last-child
        +size(12px)
        margin-top: 2px 

  &--line
    +size(0, 5px)
    background: #dbdfdf
    position: relative
    z-index: 2
    border-radius: 1px

    &-1
      position: absolute
      top: 12px
      left: 33px

    &-2
      background: #f3f3f3
      position: absolute
      top: 21px
      left: 33px

    &-3
      background: #f3f3f3
      position: absolute
      top: 12px
      right: 10px

    &-4
      margin-top: 13px

    &-5
      margin-top: 7px

.block-top,
.block-bottom
  +size(166px, 58px)
  margin: auto
  border: 1px solid #e3e3e7
  position: relative
  opacity: 0

.block-top
  border-width: 0 1px 1px
  border-radius: 0 0 4px 4px
  bottom: 16px

.block-bottom
  border-width: 1px 1px 0
  border-radius: 4px 4px  0 0
  bottom: -16px

.heading
  font: 16px / 32px Arial, sans-serif
  padding-top: 50px
  position: relative
  opacity: 0
  top: 16px

p
  color: #b4b1b6 
  font: 12px / 18px Arial, sans-serif
  margin: 0 auto
  top: 16px
  opacity: 0
  position: relative


.animated
  .b-comment

    &--svg
  
      > rect
        transition: .6s ease-in-out
        stroke-dashoffset: 0  

    &--user
      transform: scale(1)
      transition: .3s .4s

    &--line

      &-1
        transition: .44s .4s
        width: 67px

      &-2
        transition: .28s .60s
        width: 53px

      &-3
        transition: .28s .60s
        width: 26px

      &-4
        transition: .44s .72s
        width: 148px

      &-5
        transition: .36s .76s
        width: 89px


    &--bell
      transform: scale(1)
      transition: .3s 1.6s

  .svg-bell
    transform: scale(1)
    transition: .2s 1.76s


  .block-top,
  .block-bottom
    transition: .28s .68s
    opacity: 1
    bottom: 0

  .heading
    transition: .36s 1s
    opacity: 1
    top: 0

  p
    transition: .2s 1.16s
    opacity: 1
    top: 0

  .rotate
    animation: rotate .28s 1.96s

    
@keyframes rotate
  20%
    transform: rotate(5deg)

  58%
    transform: rotate(-5deg)

  100%
    transform: rotate(0deg)
            
          
!
            
              var poiterEvent = ("ontouchend" in document.documentElement ? "touchend" : "click");
var $tour = document.querySelector('.b-tour');

animate(1000);
document.querySelector('.btn').addEventListener(poiterEvent, function() {
   $tour.classList.remove('animated');
   animate(500);
 });

function animate(delay) {
  setTimeout(function() {
    $tour.classList.add('animated');
  }, delay);
}
            
          
!
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