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

              
                <svg width="100%" style="opacity: 0.2;" xmlns='http://www.w3.org/2000/svg'>
  <filter id='noiseFilter'>
    <feTurbulence 
                  type='fractalNoise' 
                  baseFrequency='0.6' 
                  numOctaves='3' 
                  stitchTiles='stitch' />
  </filter>
  <rect width='100%' height='100%' filter='url(#noiseFilter)' />
</svg>

<div class="out-container">
  <div class="in-container">
    <div class="in-out-container" onclick="this.classList.toggle('on'); this.classList.add('animate'); setTimeout(() => {this.classList.remove('animate');}, 300); ">
      <svg xmlns="http://www.w3.org/2000/svg">
        <rect x="192.09" width="64.06" height="223.8" rx="31.11" ry="31.11"/>
        <path d="M123.52,95.04c4.3,6.37,5.88,13.77,4.73,22.2-1.05,7.74-4.64,14.41-10.77,20-28.44,25.96-45.59,57.74-51.46,95.33-1.02,6.55-1.58,13.19-1.68,19.92-.62,41.97,12.91,78.58,40.6,109.81,19.15,21.61,42.63,36.91,70.46,45.89,6.25,2.02,12.72,3.62,19.39,4.81,40.13,7.15,77.46,.33,111.97-20.44,5.83-3.51,11.31-7.3,16.44-11.37,15.46-12.26,28.23-26.83,38.3-43.7,11.73-19.65,18.9-41.06,21.5-64.25,2.66-23.7-.11-47.12-8.3-70.27-9.11-25.71-23.76-47.69-43.96-65.96-6.97-6.31-10.7-13.92-11.18-22.83-.31-5.69,.81-11.02,3.36-16,2.46-4.83,5.89-8.82,10.28-11.97,5.98-4.29,12.91-6.2,20.8-5.72,4.34,.27,8.46,1.41,12.36,3.42,2.69,1.39,6.03,3.93,10,7.63,29.45,27.35,50.1,60.32,61.95,98.89,8.74,28.43,11.69,57.47,8.85,87.13-.62,6.53-1.57,13.12-2.84,19.78-8.81,46.05-29.73,85.37-62.76,117.96-35.38,34.92-77.92,55.84-127.63,62.75-6.63,.93-13.27,1.52-19.92,1.79-47.37,1.9-90.93-9.82-130.7-35.16-25.45-16.23-46.91-37.17-64.36-62.84C15.7,347.65,2.84,310.03,.39,268.98c-.4-6.67-.49-13.34-.27-19.99,1.13-34.77,9.84-67.52,26.13-98.25,11.5-21.7,26.24-41,44.21-57.9,5-4.7,9.41-7.91,13.23-9.63,8.19-3.69,16.35-3.85,24.47-.48,6.54,2.72,11.66,6.82,15.36,12.31Z"/>
              </svg>
          </div>
      </div>
</div>

<input type="range" min="0" max="50" value="50" class="slider" id="slider">

<div class="footer">
  Made by: RafaQ
</div>
              
            
!

CSS

              
                body {
    display: flex;
    height: 100vh;
    justify-content: center;
    background: rgb(122,122,122);
    background: linear-gradient(205deg, rgba(122,122,122,1) 0%, rgb(30, 30, 31) 100%);
    margin: 0;
}
.out-container {
    --object-size: 330px;

 /* adjustable values below */
    --radius: 50%;
    scale: 0.6;
}
.out-container,
.out-container *{
    background-color: #fff;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    border-radius: var(--radius);
    overflow: hidden;
}
.out-container {
    width: var(--object-size);
    height: var(--object-size);
    border-radius: var(--radius);
    box-shadow: 
        10px -10px 20px 7px rgba(153, 153, 153, 0.2),
        -7px 20px 3px rgba(0, 0, 0, 1),
        -10px 30px 13px rgba(0, 0, 0, 1),
        -30px 80px 54px rgba(0, 0, 0, 0.8);

    background: linear-gradient(205deg, rgba(255,255,255,1) 0%, rgba(65,68,72,1) 100%);
}
.in-container {
    overflow: hidden;
    width: calc(var(--object-size) * 0.79);
    height: calc(var(--object-size) * 0.79);
    box-shadow: 
    -5px 5px 5px rgba(0, 0, 0, 0.3),
    -20px 20px 25px rgba(0, 0,0, 0.5),
    -30px 200px 75px 100px rgba(0, 0, 0, 0.5),
    0px 0px 15px 33px rgba(255, 255, 255, 0.7),
    -20px 20px 15px 35px rgba(0, 0, 0, 1);
    background: linear-gradient(205deg, rgba(255,255,255,1) 0%, rgba(65,68,72,1) 100%);
}
.in-out-container {
    width: calc(var(--object-size) * 0.58);
    height: calc(var(--object-size) * 0.58);
    transition: box-shadow 0.2s ease-in-out;
    box-shadow: 
    inset 0px 0px 12px 100px rgba(0,0,0, 0),
    inset 0px 0px 12px 12px rgba(0, 0, 0, 0.1),
    0px 0px 4px 5px rgba(0, 0, 0, 1),
    10px -10px 12px 2px rgba(0, 0, 0, 0.4),
    0px 0px 12px 27px rgba(255, 255, 255, 0.8),
    -20px 20px 15px 35px rgba(0, 0, 0, 0.7);
    background: linear-gradient(205deg, rgba(255,255,255,1) 0%, rgba(65,68,72,1) 100%);
    cursor: pointer;
}
.in-out-container.animate {
    animation: boxshadow 0.3s;
}
.in-out-container:hover{
  box-shadow: 
    inset 0px 0px 12px 100px rgba(0,0,0, 0.01),
    inset 0px 0px 12px 18px rgba(0, 0, 0, 0.1),
    0px 0px 4px 5px rgba(0, 0, 0, 1),
    10px -10px 12px 2px rgba(0, 0, 0, 0.4),
    0px 0px 12px 27px rgba(255, 255, 255, 0.8),
    -20px 20px 15px 35px rgba(0, 0, 0, 0.7);
}
@keyframes boxshadow {
    0% {
        box-shadow: 
        inset 0px 0px 12px 100px rgba(0,0,0, 0),
        inset 0px 0px 12px 12px rgba(0, 0, 0, 0.1),
        0px 0px 4px 5px rgba(0, 0, 0, 1),
        10px -10px 12px 2px rgba(0, 0, 0, 0.4),
        0px 0px 12px 27px rgba(255, 255, 255, 0.8),
        -20px 20px 15px 35px rgba(0, 0, 0, 0.7);
        background: linear-gradient(205deg, rgba(255,255,255,1) 0%, rgba(65,68,72,1) 100%);
    }
    50% {
        box-shadow: 
        inset 0px 0px 12px 100px rgba(0,0,0, 0.2),
        inset 0px 0px 12px 18px rgba(255, 255, 255, 0.2),
        0px 0px 4px 5px rgba(0, 0, 0, 1),
        10px -10px 12px 2px rgba(0, 0, 0, 0.4),
        0px 0px 12px 27px rgba(255, 255, 255, 0.8),
        -20px 20px 15px 35px rgba(0, 0, 0, 0.7);
    }
    100% {
        box-shadow: 
        inset 0px 0px 12px 100px rgba(0,0,0, 0),
        inset 0px 0px 12px 12px rgba(0, 0, 0, 0.1),
        0px 0px 4px 5px rgba(0, 0, 0, 1),
        10px -10px 12px 2px rgba(0, 0, 0, 0.4),
        0px 0px 12px 27px rgba(255, 255, 255, 0.8),
        -20px 20px 15px 35px rgba(0, 0, 0, 0.7);
        background: linear-gradient(205deg, rgba(255,255,255,1) 0%, rgba(65,68,72,1) 100%);
    }
}

.in-out-container svg{
    position: absolute;
    width: 120px;
    height: 120px;
    background-color: transparent;
    opacity: 1;
    fill: rgba(75, 75, 75, 0.2);
    transition: filter 0.1s ease-in-out;
}
.in-out-container svg > *{
    scale: 0.2;
    margin: auto;
    position: absolute;
    translate: 15px 12px;
    filter: drop-shadow( 0px 0px 18px rgba(43,255, 0, 0));
}
.in-out-container.on svg{
    opacity: 1;
    fill: rgba(43, 255, 0, 0.24);
}
.in-out-container.on svg > *{
    filter: drop-shadow( 0px 0px 18px rgba(43,255, 0, 1));
}

input[type="range"]{
  position: absolute;
  bottom: 10px;
  width: 200px;
  height: 12px;
  -webkit-appearance: none;
  background: #000;
  outline: none;
  border-radius: 15px;
  overflow: hidden;
  opacity:0.15;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 20px;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  border: 4px solid #000;
}

.footer {
    position: absolute;
    bottom: 0;
    right: 0;
    font-family: monospace;
    color: #aaa;
    padding: 10px;
    font-size: 12px;
}
              
            
!

JS

              
                document.getElementById('slider').addEventListener('input', function(e) {
  document.querySelector('.out-container').style.setProperty('--radius', this.value + '%');
});

              
            
!
999px

Console