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="wrapper">
    <div class="container">
      <div id="papers">
        <div class="paper" id="paper-3"></div>
        <div class="paper" id="paper-2"></div>
        <div class="paper" id="paper-1">
          <div></div><div></div><div></div>
        </div>
      </div>
      <div id="glasses">
        <div class="glass" id="left"></div>
        <div class="glass" id="right"></div>
      </div>
      <div id="pencil">
        <div id="tip"></div>
        <div id="body"></div>
        <div id="eraser"></div>
      </div>
      <div id="laptop">
        <div id="screen-wrapper">
          <div id="screen">
            <div id="btn"><div></div></div>
            <div id="pointer"></div>
            <div id="content">
              <p>
                <span>H</span><span>E</span><span>L</span><span>L</span><span>O</span><span> W</span><span>O</span><span>R</span><span>L</span><span>D</span></p></div>
            <div id="reflection_1"></div>
            <div id="reflection_2"></div>
          </div>
        </div>
        <div id="keyboard-wrapper">
          <div id="keyboard">
            <div class="row">
              <div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
            </div>
            <div class="row">
              <div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
            </div>
            <div class="row">
              <div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
            </div>
            <div class="row">
              <div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
            </div>
            <div class="row">
              <div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
            </div>
          </div>
        </div>
      </div>
      <div id="mouse">
        <div></div>
      </div>
      <div id="cup-wrapper">
        <div id="handle"></div>
        <div id="cup">
          <div id="bubble-1"></div>
          <div id="bubble-2"></div>
          <div id="bubble-3"></div>
        </div>
      </div>
      <div id="phone">
        <div id="phone_screen">
          <div id="reflect"></div>
        </div>
        <div id="camera"></div>
        <div id="speaker"></div>
        <div id="home"></div>
      </div>
      <div id="book">
        <div id="book-left">
          <div></div><div></div><div></div><div></div><div></div><div></div>
        </div>
        <div id="book-right">
          <div></div><div></div><div></div><div></div><div></div><div></div><div></div>

        </div>
        <div class="label" id="label-1"></div>
        <div class="label" id="label-2"></div>
        <div class="label" id="label-3"></div>
      </div>
      <div id="hand">
        <div id="thumb">
          <div id="first"></div>
          <div id="second"></div>
          <div class="nail"></div>
        </div>
        <div id="index"><div class="nail"></div></div>
        <div id="middle"><div class="nail"></div></div>
        <div id="ring"><div class="nail"></div></div>
        <div id="little"><div class="nail"></div></div>
        <div id="palm"></div>
        <div id="wrist"></div>
        <div id="arm"></div>
      </div>
    </div>
</div>
            
          
!
            
              :root {
	--prime:#4E057E;
	--darker:#2E014A;
	--dark:#3E0364;
	--light:#601E8B;
	--lighter:#723798;
	--high:#FFE100;
}

body{
	margin:0;
}
.wrapper {
	display: flex;
	background:var(--prime);
	width:100%;
	height:100vh;
	overflow:hidden;
}
.container{
	position:relative;
	margin: auto;
	width:600px;
	height:400px;
	border-radius:4px;
	transform:scale(1.5);
	overflow:hidden;
}
.container div {
	box-sizing:border-box;
}
#screen-wrapper {
	perspective: 100px;
}
#screen {
	position:absolute;
	left:198px;top:80px;
	width:220px;height:126px;
	background:var(--light);
	transform-origin:bottom;
	transform-style: preserve-3d;
	transform:rotatex(-5deg);
	border:6px solid var(--dark);
	border-bottom: 14px solid var(--dark);
	border-radius:4px;
	box-shadow: 0 -3px 1px var(--light);
	overflow: hidden;
}
#screen #btn {
  position:absolute;
  width:40px; height:16px;
  left:90px; top:72px;
  background:var(--lighter);
  border-radius:4px;
}
#screen #btn div {
  width:100%; height:100%;
  background:var(--high);
  border-radius:4px;
  transform:scalex(0);
  animation: btn-active .5s ease-in-out 2.5s 1 normal forwards running;

}
@keyframes btn-active {
  0%{
    transform:scalex(0)
  }
  100%{
    transform:scalex(1);
  }
}
#screen #pointer {
  position:absolute;
  width:5px; height:5px;
  left:10px; top:40px;
  background:var(--high);
  border-radius:4px;
  animation: move-pointer 1.5s cubic-bezier(0.3,-0.4, 0.58, 1) 1.2s 1 normal forwards running;
}
@keyframes move-pointer{
  0%{
    transform:translate(0);
  }
  85%,100%{
    transform:translate(100px,40px);
  }
}
#screen #content{
  text-align:center;
  postition:absolute;
  top:100px;
}
#screen #content p{
  font-family: 'Monoton', cursive;
  color:var(--high);
}
#screen #content p span{
  opacity:0;
  animation-name: helloworld;
  animation-duration: .15s;
  animation-timing-function:ease-in-out;
  animation-fill-mode:forwards;
  animation-play-state:running;
}
#screen #content p span:nth-child(1) {
  animation-delay:2.6s;
}
#screen #content p span:nth-child(2) {
  animation-delay:2.7s;
}
#screen #content p span:nth-child(3) {
  animation-delay:2.8s;
}
#screen #content p span:nth-child(4) {
  animation-delay:2.9s;
}
#screen #content p span:nth-child(5) {
  animation-delay:3s;
}
#screen #content p span:nth-child(6) {
  animation-delay:3.1s;
}
#screen #content p span:nth-child(7) {
  animation-delay:3.2s;
}
#screen #content p span:nth-child(8) {
  animation-delay:3.3s;
}
#screen #content p span:nth-child(9) {
  animation-delay:3.4s;
}
#screen #content p span:nth-child(10) {
  animation-delay:3.5s;
}
@keyframes helloworld{
  0%{
    opacity:0;
  }
  100%{
    opacity:1;
  }
}

#reflection_1 {
	position: absolute;
	position:absolute;
	left:-50px;
	top:-40px;
	width:100px;
	height:150px;
	background:var(--dark);
	opacity: .2;
	transform: rotateZ(30deg);
}
#reflection_2 {
	position: absolute;
	position:absolute;
	left:130px;
	top:-20px;
	width:50px;
	height:150px;
	background:var(--dark);
	opacity: .2;
	transform: rotateZ(30deg);
}


#keyboard-wrapper{
	position:absolute;
	left:198px;
	top:206px;
	width:220px;
	height:116px;
	background:var(--light);
	border-radius:4px;
	box-shadow: 0px 3px 1px var(--darker);
}
#keyboard {
	position: relative;
	margin: 10px auto;
	width:200px;
	height:66px;
	background:var(--light);
	border-radius:4px;
	box-shadow: -1px -1px 1px var(--darker);
}
#keyboard .row{
	position: relative;
	width: 100%;
	height:14px;
	display: flex;
	justify-content:space-between;
	padding: 1px;
}
#keyboard .row:nth-child(1){
	padding-top: 2px;
	height: 8px;
}

#keyboard .row div{
	background: var(--dark);
	height: 100%;
	margin: 0 2px;
	border-radius: 1px;
	flex-grow: 1;
}

#keyboard .row:nth-child(2) div:last-child
 {
	flex-grow: 1.3;
}
#keyboard .row:nth-child(3) div:nth-child(1)
 {
	flex-grow: 1.3;
}
#keyboard .row:nth-child(4) div:nth-child(1),
#keyboard .row:nth-child(4) div:last-child
 {
	flex-grow: 2;
}
#keyboard .row:nth-child(5) div:nth-child(5)
 {
	flex-grow: 5;
}

#mouse {
	position:absolute;
	left:438px;top:247px;
	width:47px;height:75px;
	border-radius:23px;
	transform:rotatez(-5deg);
	background:var(--light);
  box-shadow:1px 1px 0 1px var(--dark), 2px 2px 4px var(--dark);
  animation:move-mouse 1.5s ease-in-out 1s 1 normal forwards running;
}
@keyframes move-mouse {
  0%{
    transform:translate(0) rotatez(-5deg);
  }
  85%,100%{
    transform:translate(5px,2px) rotatez(-5deg);
  }
}
#mouse div {
  position:absolute;
  left:23px;top:0;
  width:1px; height:25px;
  background:var(--dark);
  box-shadow:0px 0px 1px var(--dark);
  opacity:.8;
}

#cup-wrapper {
	position:absolute;
	left:81px;
	top:330px;
	transform:rotatez(-15deg);
	background:#ffffff11;
}
#handle {
	position:absolute;
	top:25px;
	width:23px;
	height:16px;
	background:var(--light);
}
#cup {
	position:absolute;
	top:0;
	left:19px;
	width:66px;
	height:66px;
	border-radius:100px;
	background:var(--dark);
	border:6px solid var(--light);
	box-shadow:-10px -12px var(--prime) inset, 2px 4px 6px var(--dark);
}

#bubble-1 {
	position:absolute;
	left:22px;
	top:8px;
	width:6px;
	height:6px;
	border-radius:3px;
	background:var(--lighter);
}
#bubble-2 {
	position:absolute;
	left:13px;
	top:11px;
	width:5px;
	height:5px;
	border-radius:3px;
	background:var(--light);
}
#bubble-3 {
	position:absolute;
	left:30px;
	top:8px;
	width:4px;
	height:4px;
	border-radius:2px;
	background:var(--light);
}

#book {
	position:absolute;
	top:38px; left:50px;
	width:112px; height:72px;
	border-radius:4px;
	transform:rotatez(-29deg);
	background:var(--light);
  box-shadow: 1px 1px 2px var(--dark);
}
#book #book-left {
  position:absolute;
  top:7px; left:5px;
  width:50px; height:60px;
  border-radius:2px;
	background:var(--lighter);
  box-shadow: -2px 2px 1px var(--prime);
}
#book #book-right {
  position:absolute;
  top:7px; right:5px;
  width:50px; height:60px;
  border-radius:2px;
	background:var(--lighter);
  box-shadow: 2px 2px 1px var(--prime);
}
#book #book-left div {
  margin:6px auto;
  width:46px; height:1px;
  background:var(--light);
  opacity:.5;
}
#book #book-right div {
  margin:6px auto;
  width:46px; height:1px;
  background:var(--light);
  opacity:.5;
}
#book .label {
  position:absolute;
  top:2px;
  width:10px; height:5px;
}
#book #label-1 {
  left:12px;
	background:var(--prime);
}
#book #label-3 {
  left:24px;
	background:var(--prime);
}
#book #label-2 {
  right:12px;
	background:var(--prime);
}

#phone {
	position:absolute;
	top:204px;
	left:64px;
	width:46px;
	height:84px;
	border-radius:9px;
	transform:rotatez(26deg);
	background:var(--light);
  box-shadow: 2px 0px 0px var(--dark), 1px 1px 2px var(--darker);
	animation: shaking 100ms ease-in-out 4s alternate 25 running;
}
/* .phone_animate{
	animation: shaking 100ms ease-in-out 0s alternate infinite running;
} */
@keyframes shaking {
	0%{
	transform:rotatez(26deg);
	}
	100%{
	transform:rotatez(32deg);
	}
}
#phone_screen {
	position:absolute;
	left:6%;
	top:12%;
	width:88%;
	height:76%;
	background:var(--dark);
	overflow:hidden;
  animation:lighton 3s ease-in-out 4s 1 normal forwards running;
  
}
@keyframes lighton{
  0%,100%{
    background:var(--dark);
  }
  20%,80%{
    background:var(--high);
  }
}
#reflect{
	position:absolute;
	transform:rotatez(30deg);
	top:-10px;
	width:25px;
	height:100px;
	background:#fff;
  opacity:.1;
}
#phone #camera {
	position:absolute;
	left:16px;
	top:4px;
	width:3px;
	height:3px;
	border-radius:6px;
	background:var(--prime);
}
#phone #speaker{
	position:absolute;
	left:22px;
	top:5px;
	width:8px;
	height:2px;
	background:var(--prime);
}
#phone #home{
	position:absolute;
	left:19px;
	top:75px;
	width:8px;
	height:8px;
	border-radius:100px;
	background:var(--prime);
}

#papers {
	position:absolute;
	left:437px;
	top:77px;
	width:118px;
	height:139px;
	transform:rotatez(-29deg);
}
.paper {
	position:absolute;
	width:92px; height:118px;
	background:var(--light);
	box-shadow: 1px 1px 2px 1px var(--dark);
}
#paper-1{
	left:14px;top:0;
	text-align:center;
	vertical-align:bottom;
	font-size:18px;
	}
#paper-1 div {
  width:20px;height:20px;
  background:var(--prime);
  opacity:.5;
  display:inline-block;
  margin:60px 2px;
}

#paper-2{
	left:0;
	top:3px;
	transform-origin:center;
	transform:rotatez(-13deg);
}
#paper-3{
	left:18px;
	top:2px;
	transform-origin:bott;
	transform:rotatez(4deg);
}

#glasses {
	position:absolute;
	left:466px;
	top:100px;
	transform:rotatez(-55deg);
}

.glass {
	position:absolute;
	width:38px;
	height:32px;
	border: 3px solid var(--dark);
	background:var(--prime);
}
#left {
	border-radius:50% 50% 60% 50% / 25% 20% 80% 80%;
}

#right {
	left:44px;
	border-radius:50% 50% 50% 60% / 20% 25% 80% 80%;

}

#pencil {
	position:absolute;
	left:558px;top:116px;
	width:14px;height:62px;
	transform:rotatez(-6deg);
}
#pencil #tip{
  position:absolute;
  left:6px; top:0;
  width:2px; height:4px;
  background:var(--darker);
  box-shadow:2px 2px 2px var(--dark);
}
#pencil #body{
  position:absolute;
  left:0; top:4px;
  width:14px; height:58px;
  background:var(--light);
  border-radius:7px 7px 3px 3px;
  box-shadow:2px 2px 2px var(--dark);
}
#pencil #eraser {
  position:absolute;
  left:0; top:52px;
  width:14px; height:4px;
  background:var(--lighter);
  opacity:.8;
}
#hand {
	position:absolute;
	left:438px;
	top:254px;
  animation:move-hand 1.5s ease-in-out 1s 1 normal forwards running;
}
@keyframes move-hand {
  0%{
    transform:translate(0);
  }
  85%,100%{
    transform:translate(5px,2px);
  }
}
#hand div {
	position:absolute;
}
#hand #thumb {

}
#hand #index {
	left:10px;
	top:6px;
	width:11px;
	height:46px;
	background:var(--lighter);
	transform:rotatez(-5deg);
	border-radius:50% 50% 10% 10% / 10%;
}
#hand #middle {
	left:21px;
	width:12px;
	height:46px;
	background:var(--lighter);
	transform:rotatez(-3deg);
	border-radius:50% 50% 10% 10% / 13%;
}
#hand #ring {
	left:34px;
	top:7px;
	width:12px;
	height:46px;
	background:var(--lighter);
	border-radius:50% 50% 10% 10% / 12%;
}
#hand #little {
	left:46px;
	top:26px;
	width:10px;
	height:46px;
	background:var(--lighter);
	transform:rotatez(2deg);
	border-radius:50% 50% 10% 10% / 10%;
}
#hand .nail {
	left:10%;
	top:2px;
	width:80%;
	height:7px;
	background:var(--light);
	border-radius:50%;
}
#hand #thumb #first {
	top:35px;
	width:9px;
	height:29px;
	background:var(--lighter);
	transform:rotatez(15deg);
	border-radius:50% 50% 10% 50% / 10% 90% 10% 20%;
}
#hand #thumb #second {
	top:52px;
	left:2px;
	width:11px;
	height:42px;
	background:var(--lighter);
	transform:rotatez(-18deg);
	border-radius:50% / 20% 20% 50%;
}
#hand #palm {
	left:10px;
	top:43px;
	width:47px;
	height:56px;
	background:var(--lighter);
	transform:rotatez(-3deg);
	border-radius:10% 50% 30% 20% / 60% 10% 50% 20%;
}
#hand #wrist{
	left:19px;
	top:86px;
	width:32px;
	height:20px;
	background:var(--lighter);
	border-radius:6px;
}
#hand #arm{
	left:15px;
	top:100px;
	width:44px;
	height:45px;
	background:var(--light);
	border-radius:6px;
	transform:rotatez(-3deg);
}
            
          
!
            
              // window.setInterval(function(){
//   $("#phone").toggleClass('phone_animate');
//   $("#phone_screen").toggleClass('phone_screen_light');
// },3000)
            
          
!
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