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.

            
              h1 Walkie Talkie

ul
  li
    .face.walker
      span.eyes.left-eye
      span.eyes.right-eye
      span.mouth
    p [ Walker ]    

  li
    .face.monster
      span.eyes.left-eye
      span.eyes.right-eye
      span.mouth
      span.below-teeth
    p [ Monster ] 
  li
    .face.talker
      span.eyes.left-eye
      span.eyes.right-eye
      span.mouth
      span.chat
        .words @#!
    p  [ Talker ]  
      
p      
  a(href="https://dribbble.com/shots/2368155-Walkie-Talkie") >>>> Check it on Dribbble!  <<<<


    
            
          
!
            
              color_brand               = #ACCAFF
color_background          = #59597B


color_azure               = #01C9FC
color_green               = #53ECA4
color_pink                 = #ED51AC
color_orange              = #FF914C
color_violet              = #ACCAFF
color_purple              = #AB8BFE
color_yellow              = #FEF178

color_red                 = #ED5151

color_darkest             = #31323E
color_grey                = #565763


body
  text-align center
  font-family Titillium, Monaco, sans-serif
  text-rendering optimizeLegibility
  font-size 1em
  line-height 1.5em
  color color_brand
  background-color color_darkest

h1
  padding-top: 6em
  padding-bottom: 2em
  
a
  color: color_brand
  font-size: .9em
  text-decoration: none
  
  &:hover
    color: lighten(color_brand, 25%)
  
p
  font-size .65em
  margin-top: 1.75em
  text-align: center

li
  display: inline-block
  padding: 2em
  transition: transform .15s ease-out

  &:active
    transform: scale(1.1)

//- -----------------------------------
//-
//-    Faces
//-
//- -----------------------------------


.face
  width: 2em
  height: 2em
  position: relative
  border-radius: 4px
  margin: 0 auto
  top: .5em
  z-index: 9

.eyes
  transition-duration .1s
  position absolute
  top 5px
  height 12px
  width 5px


.left-eye
  left 7px

.right-eye
  right 7px

.mouth
  transition-duration .2s
  position absolute
  bottom 6px
  width 60%
  left 20%
  height 5px

.face
  &:hover
    cursor: pointer


.walker
  background: color_green

  .eyes,
  .mouth
    background darken(color_green, 50%)

  &:hover
    animation: walk 1.6s cubic-bezier(.71,.02,.22,1.36) alternate infinite

    .left-eye
      left 10px
    .right-eye
      right 10px
    .mouth
      height 6px
      width 14%
      left 43%
      border-radius 100%

.talker
  background: color_azure

  .eyes,
  .mouth
    background darken(color_azure, 50%)

  .mouth
    transition: 0

  &:hover
    .mouth
      transition: 0
      animation: talk .6s both infinite

    .chat
      opacity: 1

      .words
        animation: type 1.6s .3s infinite both

.chat
  position: absolute
  text-align: center
  top: -9px
  height: 18px
  width: 30px
  right: -2.35em
  background-color: white
  opacity: 0
  transition: opacity .15s ease-out


  .words
    width: 22px;
    margin-left: 5px
    white-space:nowrap;
    overflow:hidden;
    color: darken(color_background, 20%)
    font-size: 12px
    line-height: 1.6

  &:before
    content: ""
    position: absolute
    bottom: -6px
    left: .2em
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 10px 0 0;
    border-color: white transparent transparent transparent

.monster
  background: color_red
  transform-origin: center center;

  &:before
    content: ""
    position: absolute
    top: -3px
    left: -3px
    width: 0;
    height: 0;
    border-style: solid
    border-width:  0 4px 6px 4px
    border-color: transparent transparent #B54040 transparent
    transform: rotate(-40deg)

  &:after
    content: ""
    position: absolute
    top: -3px
    right: -3px
    width: 0;
    height: 0;
    border-style: solid
    border-width:  0 4px 6px 4px
    border-color: transparent transparent #B54040 transparent
    transform: rotate(40deg)

  .eyes
    background white
    top 11px
    height 5px

  .left-eye
    &:before
      content: ""
      position: absolute
      top: -4px
      left: -2px
      width: 10px;
      height: 5px;
      background-color: #B54040
      transform: rotate(35deg)


  .right-eye
    &:before
      content: ""
      position: absolute
      top: -4px
      right: -2px
      width: 10px;
      height: 5px;
      background-color: #B54040
      transform: rotate(-35deg)


  .mouth
    background darken(color_red, 50%)
    transition: none

    &:before
      content: ""
      position: absolute
      top: 0
      left: 1px
      width: 0;
      height: 0;
      border-style: solid;
      border-width: 3px 3px 0 3px;
      border-color: color_red transparent transparent transparent;

    &:after
      content: ""
      position: absolute
      top: 0
      right: 1px
      width: 0;
      height: 0;
      border-style: solid;
      border-width: 3px 3px 0 3px;
      border-color: color_red transparent transparent transparent;


  .right-eye
    &:before
      content: ""
      position: absolute
      top: -4px
      right: -2px
      width: 10px;
      height: 5px;
      background-color: #B54040
      transform: rotate(-35deg)

  &:hover
    animation-duration: 100ms;
    animation-iteration-count: infinite;
    animation-name: shake-little;
    animation-timing-function: ease-in-out;



    .eyes
      top: 8px

    .left-eye
      left 7px

      &:before
        top: -4px
        left: -2px
        transform: rotate(20deg)

    .right-eye
      right 7px

      &:before
        top: -4px
        right: -2px
        transform: rotate(-20deg)

    .mouth
      transition: none
      height: 14px
      width: 70%
      left: 15%
      border-radius: 100%
      top: 16px

      &:before
        top: 0
        left: 2px

      &:after
        top: 0
        right: 2px

    .below-teeth
      &:before
        content: ""
        position: absolute
        bottom: 2px
        left: 7px
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 0 3px 3px 3px;
        border-color: transparent transparent color_red transparent

      &:after
        content: ""
        position: absolute
        bottom: 2px
        right: 7px
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 0 3px 3px 3px;
        border-color: transparent transparent color_red transparent


@keyframes talk
  0%,50%
    height: 10px
    left: 20%
    border-radius: 100%
    top: 19px
    width 60%


  25%,75%
    bottom 6px
    left 20%
    width 60%

@keyframes walk
  0%
    transform: translate3d(0,0,0)
  50%
    transform:  translate3d(.5em,0,0)
  100%
    transform:  translate3d(-.5em,0,0)


@keyframes type
  0%
    width: 0
  30%
    width: 22px
  60%
    width: 0
  100%
    width: 0


@keyframes shake-little {
  2% {
    transform: translate(1px, 1px) rotate(0.5deg); }
  4% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  6% {
    transform: translate(1px, 1px) rotate(0.5deg); }
  8% {
    transform: translate(1px, 1px) rotate(0.5deg); }
  10% {
    transform: translate(1px, 1px) rotate(0.5deg); }
  12% {
    transform: translate(0px, 1px) rotate(0.5deg); }
  14% {
    transform: translate(0px, 1px) rotate(0.5deg); }
  16% {
    transform: translate(0px, 0px) rotate(0.5deg); }
  18% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  20% {
    transform: translate(0px, 1px) rotate(0.5deg); }
  22% {
    transform: translate(0px, 0px) rotate(0.5deg); }
  24% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  26% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  28% {
    transform: translate(0px, 0px) rotate(0.5deg); }
  30% {
    transform: translate(0px, 1px) rotate(0.5deg); }
  32% {
    transform: translate(1px, 1px) rotate(0.5deg); }
  34% {
    transform: translate(0px, 0px) rotate(0.5deg); }
  36% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  38% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  40% {
    transform: translate(0px, 1px) rotate(0.5deg); }
  42% {
    transform: translate(1px, 1px) rotate(0.5deg); }
  44% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  46% {
    transform: translate(1px, 1px) rotate(0.5deg); }
  48% {
    transform: translate(1px, 1px) rotate(0.5deg); }
  50% {
    transform: translate(0px, 1px) rotate(0.5deg); }
  52% {
    transform: translate(0px, 1px) rotate(0.5deg); }
  54% {
    transform: translate(0px, 0px) rotate(0.5deg); }
  56% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  58% {
    transform: translate(0px, 1px) rotate(0.5deg); }
  60% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  62% {
    transform: translate(0px, 1px) rotate(0.5deg); }
  64% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  66% {
    transform: translate(1px, 1px) rotate(0.5deg); }
  68% {
    transform: translate(1px, 1px) rotate(0.5deg); }
  70% {
    transform: translate(0px, 0px) rotate(0.5deg); }
  72% {
    transform: translate(0px, 0px) rotate(0.5deg); }
  74% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  76% {
    transform: translate(1px, 1px) rotate(0.5deg); }
  78% {
    transform: translate(0px, 0px) rotate(0.5deg); }
  80% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  82% {
    transform: translate(0px, 0px) rotate(0.5deg); }
  84% {
    transform: translate(1px, 1px) rotate(0.5deg); }
  86% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  88% {
    transform: translate(0px, 0px) rotate(0.5deg); }
  90% {
    transform: translate(1px, 0px) rotate(0.5deg); }
  92% {
    transform: translate(0px, 0px) rotate(0.5deg); }
  94% {
    transform: translate(0px, 1px) rotate(0.5deg); }
  96% {
    transform: translate(0px, 0px) rotate(0.5deg); }
  98% {
    transform: translate(0px, 1px) rotate(0.5deg); }
  0%, 100% {
    transform: translate(0, 0) rotate(0); } }

            
          
!
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