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 id="main"> 
  <div id="child" class="coin">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 1190 740" preserveAspectRatio="xMidYMid meet"><rect id="svgEditorBackground" x="0" y="0" width="1190" height="740" style="fill: none; stroke: none;"/><defs id="svgEditorDefs"><polygon id="svgEditorShapeDefs" style="fill:khaki;stroke:black;vector-effect:non-scaling-stroke;stroke-width:1px;"/><linearGradient gradientUnits="objectBoundingBox" id="lgrd2-black-white" spreadMethod="pad" x1="0%" x2="100%" y1="0%" y2="100%"><stop offset="0%" stop-color="black"/><stop offset="100%" stop-color="white"/></linearGradient><path id="svgEditorClosePathDefs" style="stroke:black;stroke-width:1px;fill:khaki;"/><linearGradient gradientUnits="objectBoundingBox" id="lgrd2-peachpuff-sienna-v" spreadMethod="reflect" x1="0%" x2="0%" y1="0%" y2="100%" gradientTransform=""><stop offset="0" style="stop-color: rgb(70, 209, 132);"/><stop offset="0" style="stop-color: mediumseagreen; stop-opacity: 0.84;"/><stop offset="1" style="stop-color: seagreen; stop-opacity: 1;"/></linearGradient><linearGradient gradientUnits="objectBoundingBox" id="gradient1" spreadMethod="pad" x1="0%" x2="100%" y1="0%" y2="0%" gradientTransform="rotate(73.3427)"><stop offset="0" stop-color="#A5F0C6"/><stop offset="1" stop-color="#43C77E"/></linearGradient></defs><g id="e22_group" transform="matrix(4.58028 0 0 4.58028 -1091.2 -1434.46)"><path d="M0.16842105263157994,-3.127157894736848l-4,6.928000000000001h8Z" style="fill: url(&quot;#lgrd2-peachpuff-sienna-v&quot;); vector-effect: non-scaling-stroke;" id="e7_shape" transform="matrix(11.875 0 0 11.875 307.5 400.135)"/><path d="M5.031578947368427,-5.9271578947368315l-4.421052631578949,9.370105263157892h9.17894736842105Z" style="fill: url(&quot;#lgrd2-peachpuff-sienna-v&quot;); vector-effect: non-scaling-stroke;" id="e1_shape" transform="matrix(11.875 0 0 11.875 307.5 400.135)"/><path d="M9.810526315789463,-3.0850526315789084l-3.9999999999999973,6.928000000000001h7.999999999999997Z" style="fill: url(&quot;#lgrd2-peachpuff-sienna-v&quot;); vector-effect: non-scaling-stroke;" id="e2_shape" transform="matrix(11.875 0 0 11.875 307.5 400.135)"/><path d="M255,448c38.7270245519,-14.282832783599986,72.2747006074,-19.370421575000023,101,-21c28.72529939269998,-1.6295784248999894,83.84163950329997,2.5287358388999905,126,16c42.158360496800015,13.471264161199997,-265.7270245519,19.282832783699973,-227,5Z" style="fill:url(#lgrd2-peachpuff-sienna-v); stroke-width: 1px;" id="e12_area3"/><polygon style="fill:url(#gradient1); stroke-width: 1px;" id="e21_polygon" points="291.215 394.646 309.715 362.646 326.715 393.146 314.215 383.646 309.715 394.646 304.215 383.146 290.215 396.646"/><polygon style="fill:url(#gradient1); stroke-width: 1px;" id="e1_polygon" points="348.715 368.146 367.215 330.146 386.215 367.146 372.715 354.646 367.715 365.146 360.715 354.146 348.715 368.646"/><polygon style="fill:url(#gradient1); stroke-width: 1px;" id="e2_polygon" points="405.715 395.146 424.215 363.146 441.215 393.646 428.715 384.146 424.215 395.146 418.715 383.646 404.715 397.146"/></g></svg>
  </div>
  <div id="child1" class="coin"></div>
  <div id="child2" class="coin"></div>
  <div id="child3" class="coin"></div>
  <div id="child4" class="coin"></div>
  <div id="child5" class="coin"></div>
  <div id="child6" class="coin"></div>
  <div id="child7" class="coin"></div>
  <div id="child8" class="coin">
    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 1190 740" preserveAspectRatio="xMidYMid meet"><rect id="svgEditorBackground" x="0" y="0" width="1190" height="740" style="fill: none; stroke: none;"/><defs id="svgEditorDefs"><polygon id="svgEditorShapeDefs" style="fill:khaki;stroke:black;vector-effect:non-scaling-stroke;stroke-width:1px;"/><linearGradient gradientUnits="objectBoundingBox" id="lgrd2-black-white" spreadMethod="pad" x1="0%" x2="100%" y1="0%" y2="100%"><stop offset="0%" stop-color="black"/><stop offset="100%" stop-color="white"/></linearGradient><path id="svgEditorClosePathDefs" style="stroke:black;stroke-width:1px;fill:khaki;"/><linearGradient gradientUnits="objectBoundingBox" id="lgrd2-peachpuff-sienna-v" spreadMethod="reflect" x1="0%" x2="0%" y1="0%" y2="100%" gradientTransform=""><stop offset="0" style="stop-color: rgb(70, 209, 132);"/><stop offset="0" style="stop-color: mediumseagreen; stop-opacity: 0.84;"/><stop offset="1" style="stop-color: seagreen; stop-opacity: 1;"/></linearGradient><linearGradient gradientUnits="objectBoundingBox" id="gradient1" spreadMethod="pad" x1="0%" x2="100%" y1="0%" y2="0%" gradientTransform="rotate(73.3427)"><stop offset="0" stop-color="#A5F0C6"/><stop offset="1" stop-color="#43C77E"/></linearGradient></defs><g id="e22_group" transform="matrix(4.58028 0 0 4.58028 -1091.2 -1434.46)"><path d="M0.16842105263157994,-3.127157894736848l-4,6.928000000000001h8Z" style="fill: url(&quot;#lgrd2-peachpuff-sienna-v&quot;); vector-effect: non-scaling-stroke;" id="e7_shape" transform="matrix(11.875 0 0 11.875 307.5 400.135)"/><path d="M5.031578947368427,-5.9271578947368315l-4.421052631578949,9.370105263157892h9.17894736842105Z" style="fill: url(&quot;#lgrd2-peachpuff-sienna-v&quot;); vector-effect: non-scaling-stroke;" id="e1_shape" transform="matrix(11.875 0 0 11.875 307.5 400.135)"/><path d="M9.810526315789463,-3.0850526315789084l-3.9999999999999973,6.928000000000001h7.999999999999997Z" style="fill: url(&quot;#lgrd2-peachpuff-sienna-v&quot;); vector-effect: non-scaling-stroke;" id="e2_shape" transform="matrix(11.875 0 0 11.875 307.5 400.135)"/><path d="M255,448c38.7270245519,-14.282832783599986,72.2747006074,-19.370421575000023,101,-21c28.72529939269998,-1.6295784248999894,83.84163950329997,2.5287358388999905,126,16c42.158360496800015,13.471264161199997,-265.7270245519,19.282832783699973,-227,5Z" style="fill:url(#lgrd2-peachpuff-sienna-v); stroke-width: 1px;" id="e12_area3"/><polygon style="fill:url(#gradient1); stroke-width: 1px;" id="e21_polygon" points="291.215 394.646 309.715 362.646 326.715 393.146 314.215 383.646 309.715 394.646 304.215 383.146 290.215 396.646"/><polygon style="fill:url(#gradient1); stroke-width: 1px;" id="e1_polygon" points="348.715 368.146 367.215 330.146 386.215 367.146 372.715 354.646 367.715 365.146 360.715 354.146 348.715 368.646"/><polygon style="fill:url(#gradient1); stroke-width: 1px;" id="e2_polygon" points="405.715 395.146 424.215 363.146 441.215 393.646 428.715 384.146 424.215 395.146 418.715 383.646 404.715 397.146"/></g></svg>
  </div>
</div>


              
            
!

CSS

              
                html,body{
  height:100%;
  width:100%;
  margin:0;
  padding:0;
  background:radial-gradient(mediumseagreen,black);
  display:flex;
}

svg{
  margin-top:-10px;
}

svg path{
  box-shadow:2px 10px 2px black;
}

#main {
   display: block;
   width: 300px; 
  height: 300px;
   top: 10px;
   left: 10px;
   -webkit-transform-style: preserve-3d;
   -webkit-perspective: 1000px;
  animation:turn 2.5s infinite linear;
  margin:auto;
  top:20%;
}

.coin{
    display: block;
    position: absolute;
    width: 95%;
    height: 95%;
    -webkit-transform-style: preserve-3d;
    background:radial-gradient(#38bc85,#22845b,black);
    border-radius:50%;
    border:5px solid mediumseagreen; 
}

.shadow{
  background:radial-gradient(rgba(31,56,45,0.7),rgba(31,56,45,0.8),rgba(31,56,45,0.2));
  width:300px;
  height:50px;
  border-radius:50%;
  position:absolute;
  margin-left: auto;
  margin-right: auto;
  left: 0;
  right: 0;
  top:85%;
  box-shadow:0px 0px 50px rgba(31,56,45);
}

#child {

    -webkit-transform: translateZ(0px);
}

#child:after{
  content:'';
  position:absolute;
  background:#191919;
  width:200px;
  height:20px;
  top:400px;
  left:40px;
  border-radius:50%;
  box-shadow:0px 0px 10px #191919;
}

#child1 {
    -webkit-transform: translateZ(-10px);
}

#child2 {
    -webkit-transform: translateZ(-5px);

}

#child3 {
    -webkit-transform: translateZ(-2px);
}

#child4 {
    -webkit-transform: translateZ(-8px);
}

#child5 {
    -webkit-transform: translateZ(-12px);
}

#child6 {
    -webkit-transform: translateZ(-14px);
}

#child7 {
    -webkit-transform: translateZ(-16px);
}

#child8 {
    -webkit-transform: translateZ(-18px);
}



  
  @keyframes turn{
    0%{
      transform: rotateY(-180deg);
    }
    100%{
      transform: rotateY(180deg);
    }
  }
              
            
!

JS

              
                
              
            
!
999px

Console