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"></div>
              
            
!

CSS

              
                body {
  background-color: rgba(128, 128, 0, 0.2); // <= olive
}

.App {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 20px;
  gap: 20px;
}

.egg-box {
  width: 100px;
  height: 100px;
  background: pink;
  position: relative;
}

.egg {
  height: 100px;
  width: 80px;
  background-color: deepskyblue;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
}

.eyes-box {
  width: 100px;
  height: 100px;
  background: yellow;
  position: relative;
  &::before {
    content: "";
    position: absolute;
    height: 14px;
    width: 14px;
    background-color: white;
    border-radius: 50%;
    top: 20px;
    left: 20px;
    box-shadow: 40px 0 0 white, 2px 0 0 5px midnightblue,
      42px 0px 0 5px midnightblue;
  }
  &::after {
    content: "";
    position: absolute;
    height: 15px;
    width: 35px;
    top: 70px;
    left: 30px;
    border-radius: 5px 5px 15px 15px;
    border: 3px solid red;
    background: radial-gradient(at 50% 100%, #f5750f 8px, blue 8px);
  }
}

.nose-box {
  width: 100px;
  height: 100px;
  background: rgba(205, 92, 92, 0.3); // indianread
  position: relative;
  &::before {
    content: "";
    position: absolute;
    height: 12px;
    width: 12px;
    background-color: black;
    border-radius: 50%;
    top: 25px;
    left: 22px;
    box-shadow: 40px 0 0 black;
  }
  &::after {
    content: "";
    position: absolute;
    // height: 20px;
    height: 10px;
    width: 10px;
    top: 50px;
    left: 42px;
    // border-radius: 0 0 15px 15px;
    border-radius: 50%;
    // border-top: 1px solid transparent;
    border-left: 1px solid black;
    border-right: 1px solid black;
    border-bottom: 1px solid black;
    // border-radius: 50%;
    // border-left: solid 8px transparent;
    // border-right: solid 8px blue;
    // border-top: solid 8px blue;
    // border-bottom: solid 8px blue;
  }
}
.man01-box {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: lightcyan;
  position: relative;
  overflow: hidden;

  .head-body {
    width: 60px;
    height: 60px;
    background: lightsalmon;
    border-radius: 50%;
    position: absolute;
    left: 20px;
    box-shadow: 0 80px 0 24px turquoise;
  }
}
.test01 {
  width: 100px;
  height: 100px;
  background: rgba(255, 99, 71, 0.7); // <= orange
  border-radius: 100%;
  position: relative;
  &::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 20px;
    width: 14px;
    height: 14px;
    background: black;
    border: 7px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px;
  }
  &::after {
    content: "";
    position: absolute;
    top: 20px;
    right: 20px;
    width: 14px;
    height: 14px;
    background: black;
    border: 7px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px;
  }
}
.cloudNose {
  width: 100px;
  height: 100px;
  background: rgba(205, 92, 92, 0.3); // indianread
  position: relative;
  &::after {
    content: "";
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    width: 12px;
    height: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border-top: solid 2px transparent;
    border-right: solid 2px blue;
    border-left: solid 2px blue;
    border-bottom: solid 2px blue;
  }
}
.mouth {
  width: 100px;
  height: 100px;
  background: lightgrey;
  position: relative;
  &::after {
    content: "";
    top: 60%;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid red;
  }
}
.border-radius {
  width: 100px;
  height: 100px;
  background: violet;
  position: relative;
  &::before {
    content: "";
    top: 10%;
    left: 10%;
    background: slateblue;
    position: absolute;
    width: 80px;
    height: 30px;
    // border-radius: 50% 50% 50% 50% / 0 0 100% 100%;
    border-radius: 5% 5% 50% 50%;
  }
  &::after {
    content: "";
    top: 50%;
    left: 10%;
    // background: slateblue;
    position: absolute;
    width: 80px;
    height: 30px;
    border: 3px solid red;
    border-radius: 10px 10px 30px 30px;
    background: radial-gradient(at 50% 100%, red 20px, slateblue 20px);
  }
}
.neck {
  width: 100px;
  height: 100px;
  background: peachpuff;
  position: relative;
  overflow: hidden;
  &::before {
    content: "";
    width: 60px;
    height: 60px;
    background: lightsalmon;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 7px;
    border: 1px solid black;
    box-shadow: 0 110px 0 40px lightsalmon;
    z-index: 1;
  }
  &::after {
    content: "";
    width: 40px;
    height: 60px;
    background: lightsalmon;
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
  }
}
.eye {
  width: 100px;
  height: 100px;
  background: lightsteelblue;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  &::before {
    content: "";
    width: 15px;
    height: 15px;
    position: absolute;
    top: 35px;
    left: 20px;
    border-radius: 70% 0px;
    border-top: 2px solid black;
    border-left: 2px solid black;
    transform: rotate(-135deg);
  }
  &::after {
    content: "";
    width: 15px;
    height: 15px;
    position: absolute;
    top: 35px;
    right: 20px;
    border-radius: 70% 0px;
    border-top: 2px solid black;
    border-left: 2px solid black;
    transform: rotate(-135deg);
  }
  .eye-mouth {
    width: 15px;
    height: 15px;
    position: absolute;
    top: 75%;
    left: 42px;
    border-radius: 300% 0px;
    border-top: 2px solid red;
    border-left: 2px solid red;
    transform: rotate(-135deg);
  }
  .eye-nose {
    position: absolute;
    height: 15px;
    width: 15px;
    top: 60%;
    left: 42px;
    border-radius: 50%;
    border-left: 1px solid black;
    border-right: 1px solid black;
    border-bottom: 1px solid black;
    // transform: rotate(135deg);
  }
}

              
            
!

JS

              
                import React from "https://cdn.skypack.dev/react@17.0.1";
import ReactDOM from "https://cdn.skypack.dev/react-dom@17.0.1";




function App() {
  return (
    <div className="App">
      <div className="egg-box">
        <div className="egg"></div>
      </div>
      <div className="eyes-box"></div>
      <div className="nose-box"></div>
      <div className="man01-box">
        <div className="head-body"></div>
      </div>
      <div className="test01"></div>
      <div className="cloudNose"></div>
      <div className="mouth"></div>
      <div className="border-radius"></div>
      <div className="neck"></div>
      <div className="eye">
        <div className="eye-mouth"></div>
        <div className="eye-nose"></div>
      </div>
    </div >
  );
}



ReactDOM.render(<App />, document.querySelector(".container"));

              
            
!
999px

Console