Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="container flex">
  <div class="flex main">
    <div class="coffee__cont">
      <div class="coffee__hand"></div>
      <div class="coffee dark__border flex">
        <div class="coffee__top dark__border">
          <div class="coffee__top__water dark__border flex">
            <span class="heart">
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="#fcc8a020" width="130px">
                <path fill-rule="evenodd" d="M3.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z" clip-rule="evenodd" />
              </svg>
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="#fcc8a030" width="100px">
                <path fill-rule="evenodd" d="M3.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z" clip-rule="evenodd" />
              </svg>
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="#eeeeee70" width="70px">
                <path fill-rule="evenodd" d="M3.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z" clip-rule="evenodd" />
              </svg>
              <svg width="40px" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="#D5792490">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z" />
              </svg>
            </span>
          </div>
        </div>
        <div class="coffee__white_banner"></div>
      </div>
    </div>
    <div class="beans flex">
      <div class="bean dark__border bean__1">
        <div class="bean__shadow"></div>
        <div class="bean__top">
          <div class="bean__top__semicircle"></div>
        </div>
      </div>
      <div class="bean dark__border">
        <div class="bean__shadow"></div>
        <div class="bean__top">
          <div class="bean__top__semicircle"></div>
        </div>
      </div>
    </div>
    <div class="plate dark__border flex">
      <div class="plate__inner dark__border"></div>
    </div>
  </div>
  <a class="twitter_follow flex" href="https://twitter.com/saviomartin7" target="_blank">
    <svg width="20" height="20" fill="currentColor" class="text-white opacity-40">
      <path d="M6.29 18.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0020 3.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.073 4.073 0 01.8 7.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 010 16.407a11.616 11.616 0 006.29 1.84"></path>
    </svg>
    <p>Follow me</p>
  </a>
</div>
              
            
!

CSS

              
                /* Importing Font */
@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");

* {
  margin: 0;
  padding: 0;
}

/* Main */
.container {
  height: 100vh;
  width: 100vw;
  background: #fecc80;
  overflow: hidden;
  flex-direction: column;
}
.main {
  flex-direction: column;
  position: relative;
}

/* Reusable Components */
.flex {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dark__border {
  border: 3px solid #6a1809;
}

/* Coffee Styling Starts */
.coffee__cont {
  position: relative;
}

/* Coffee Hand */
.coffee__hand {
  width: 52px;
  height: 45%;
  z-index: 10;
  position: absolute;
  top: 22%;
  right: -42px;
  z-index: 3;
  border-radius: 0% 100% 100% 0% / 100% 50% 50% 0%;
  transform: rotate(10deg);
  border: 20px solid #fbab30;
}
.coffee__hand::before {
  border: 3px solid #6a1809;
  content: "";
  display: block;
  position: absolute;
  top: 3px;
  left: 3px;
  right: 0px;
  bottom: 3px;
  border-radius: 0% 100% 100% 0% / 100% 50% 50% 0%;
}
.coffee__hand::after {
  content: "";
  border: 3px solid #6a1809;
  display: block;
  position: absolute;
  top: -15%;
  left: -1%;
  width: 135%;
  height: 126%;
  border-radius: 0% 100% 100% 0% / 100% 50% 50% 0%;
}

/* Coffee */
.coffee {
  width: 250px;
  height: 220px;
  background: #fbab30;
  border-radius: 50% 50% 50% 50% / 35% 35% 65% 65%;
  overflow: hidden;
  justify-content: flex-start;
  flex-direction: column;
  position: relative;
  z-index: 10;
}
.coffee::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 17%;
  height: 100%;
  transform: rotate(13deg);
  z-index: 10;
  background: #6a180955;
}
.coffee::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 15%;
  height: 100%;
  transform: rotate(-15deg);
  z-index: 10;
  background: #ffffff25;
}

/* Coffee Top Part */
.coffee__top {
  margin: 10px;
  height: 100px;
  width: 205px;
  border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
  background: #d17423;
  border: 2px solid #6a180945;
  z-index: 12;
}

/* Coffee inside cup */
.coffee__top__water {
  margin-top: 10px;
  height: 85px;
  width: 200px;
  border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
  background-color: #8c5836;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 1000 1000'%3E%3Cdefs%3E%3CradialGradient id='a' cx='500' cy='500' r='58.2%25' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%238C5836'/%3E%3Cstop offset='1' stop-color='%23B2631E'/%3E%3C/radialGradient%3E%3CradialGradient id='b' cx='500' cy='500' r='100%25' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23B76C46' stop-opacity='1'/%3E%3Cstop offset='1' stop-color='%23B76C46' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect fill='url(%23a)' width='1000' height='1000'/%3E%3Cg fill='none' stroke='%23632A07' stroke-width='4.2' stroke-miterlimit='10' stroke-opacity='.5'%3E%3Ccircle cx='500' cy='500' r='725'/%3E%3Ccircle cx='500' cy='500' r='700'/%3E%3Ccircle cx='500' cy='500' r='675'/%3E%3Ccircle cx='500' cy='500' r='650'/%3E%3Ccircle cx='500' cy='500' r='625'/%3E%3Ccircle cx='500' cy='500' r='600'/%3E%3Ccircle cx='500' cy='500' r='575'/%3E%3Ccircle cx='500' cy='500' r='550'/%3E%3Ccircle cx='500' cy='500' r='525'/%3E%3Ccircle cx='500' cy='500' r='500'/%3E%3Ccircle cx='500' cy='500' r='475'/%3E%3Ccircle cx='500' cy='500' r='450'/%3E%3Ccircle cx='500' cy='500' r='425'/%3E%3Ccircle cx='500' cy='500' r='400'/%3E%3Ccircle cx='500' cy='500' r='375'/%3E%3Ccircle cx='500' cy='500' r='350'/%3E%3Ccircle cx='500' cy='500' r='325'/%3E%3Ccircle cx='500' cy='500' r='300'/%3E%3Ccircle cx='500' cy='500' r='275'/%3E%3Ccircle cx='500' cy='500' r='250'/%3E%3Ccircle cx='500' cy='500' r='225'/%3E%3Ccircle cx='500' cy='500' r='200'/%3E%3Ccircle cx='500' cy='500' r='175'/%3E%3Ccircle cx='500' cy='500' r='150'/%3E%3Ccircle cx='500' cy='500' r='125'/%3E%3Ccircle cx='500' cy='500' r='100'/%3E%3Ccircle cx='500' cy='500' r='75'/%3E%3Ccircle cx='500' cy='500' r='50'/%3E%3Ccircle cx='500' cy='500' r='25'/%3E%3C/g%3E%3Crect fill-opacity='.5' fill='url(%23b)' width='1000' height='1000'/%3E %3C/svg%3E");
  background-size: cover;
}

/* White curved line */
.coffee__white_banner {
  position: absolute;
  top: 0;
  left: 0;
  height: 165px;
  width: 100%;
  border-radius: 50% 50% 50% 50% / 40% 40% 40% 40%;
  background: #fff;
  z-index: 1;
}
.coffee__white_banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 145px;
  width: 100%;
  border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
  background: #fbab30;
}

/* Plate Styling */
.plate {
  margin-top: -90px;
  width: 350px;
  height: 139px;
  background: #fbebd0;
  border-radius: 50%;
  box-shadow: 2px 5px 8px 3px #6a180925;
  position: relative;
  z-index: 0;
  overflow: hidden;
}
.plate__inner {
  width: 250px;
  height: 90px;
  background: #fbebd0;
  border-radius: 50%;
  border: 2px solid #6a1809;
  z-index: 3;
}

/* Plate Shadow */
.plate::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 140%;
  border-radius: 50%;
  z-index: 10;
  background: #6a180955;
}

/* Beans */
.beans {
  z-index: 10;
  position: absolute;
  left: 35px;
  bottom: 45px;
}
.bean {
  height: 52px;
  border-radius: 50% 50% 50% 50% / 50% 50% 65% 65%;
  width: 62px;
  background: #9a4d39;
  overflow: hidden;
  position: relative;
}
.bean__top {
  height: 30px;
  border-radius: 50% 50% 50% 50% / 50% 50% 65% 65%;
  width: 62px;
  background: #ae7045;
  border-bottom: 4px solid #6a1809;
  overflow: hidden;
}

/* Beans shadow */
.bean__shadow {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 30%;
  height: 150%;
  transform: rotate(13deg);
  z-index: 10;
  background: #6a180985;
}
.bean__top__semicircle {
  width: 100%;
  height: 50%;
  border-bottom: 3px solid #6a1809;
}
.bean__1 {
  transform: rotate(-50deg);
  margin-right: -20px;
  margin-top: -20px;
}

/* Heart */
.heart {
  position: relative;
  transform: scale(0.75);
}
.heart svg {
  position: absolute;
  left: 50%;
  top: 0%;
  transform: translate(-50%, -50%);
}

/* Twitter */
.twitter_follow {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #fff;
  padding: 7px 10px;
  border-radius: 10px;
  border: 2px solid #6a1809;
  text-decoration: none;
  color: #000;
}
.twitter_follow p {
  margin-left: 5px;
  font-family: "Poppins", sans-serif;
}

              
            
!

JS

              
                /*
Built with ❤️ by Savio Martin
  
Follow on Twitter:
https://twitter.com/saviomartin7/
  
Copyright (c) 2020 Savio Martin
Permission is hereby granted, free of charge, to any person obtaining a copy of this project including, modify,  merge, publish, distribute, etc

Have a good day, Enjoy your ☕️
*/
              
            
!
999px

Console