desk icon

In this example below you will see how to do a desk icon with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by alangecodemaster, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright alangecodemaster ©
  • HTML
  • CSS
  • JavaScript
    <div class="container">
  <div class="computer"></div>
  <div class="computer-leg"></div>
  <div class="computer-base"></div>
  <div class="desk"></div>
  <div class="legs leg-left"></div>
  <div class="legs leg-right"></div>
  <div class="drawers">
    <div class="handle"></div>
  </div>
  <div class="drawers d-bottom">
    <div class="handle"></div>
  </div>
</div>

/*Downloaded from https://www.codeseek.co/alangecodemaster/desk-icon-gzaKZQ */
    .container{
  border: 1px solid white;
  height: 561px;
  width: 561px;
}
.desk{
  width: 561px;
  height: 50px;
  background: black;
}
body{
  margin: 10px 50px;
}
.legs{
  height: 200px;
  width: 40px;
  background: black;
}
.leg-right{
  position: relative;
  left: 500px;
  bottom: 200px;
}
.leg-left{
  position: relative;
  left: 21px;
}
.drawers{
  height: 90px;
  width: 180px;
  background: black;
  bottom: 390px;
  position: relative;
  left: 310px;
}
.d-bottom{
  margin-top:10px;
}
.handle{
  height: 5px;
  width: 50px;
  background: white;
  position: relative;
  top: 50%;
  bottom: 50%;
  right: 50%;
  left: 50%;
  transform: translateX(-50%);
}

.computer{
  height: 150px;
  width: 300px;
  background: black;
  margin-top: 55px;
  margin-left: 50%;
  transform: translateX(-50%);
}
.computer-leg{
  height: 40px;
  width: 50px;
  background: black;
  margin:0 auto;
}
.computer-base{
  height: 10px;
  width: 200px;
  background: black;
  margin:0 auto;
}


/*Downloaded from https://www.codeseek.co/alangecodemaster/desk-icon-gzaKZQ */
    

Comments