.container
  svg(viewBox="10 10 200 100")
    path(d='M20,20 C20,100 200,0 200,100')
  .block
input.distance(type='range', min='0', max='100', step='1')
h1.distance offset-distance: 50%;
input.rotate(type='range', min='0', max='360', step='1', value='0')
h1.rotate offset-rotate: auto;
View Compiled
* {
  box-sizing: border-box;
}
body {
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
          align-items: center;
  -webkit-box-pack: center;
          justify-content: center;
  min-height: 100vh;
  background: #ddd;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
          flex-direction: column;
  color: #222;
}
@media (prefers-color-scheme: dark) {
  body {
    background: #222;
    color: #ddd;
  }
}
:root {
  --line: #0fa;
}
svg {
  height: 150px;
  width: 200px;
}
path {
  fill: none;
  stroke: var(--line);
  stroke-width: 5px;
}
.container {
  position: relative;
}
.block {
  offset-path: path('M20,20 C20,100 200,0 200,100');
  width: 40px;
  height: 40px;
  border-radius: 0%;
  background: rgba(0,64,255,0.5);
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -110px;
  margin-top: -62px;
  border: 4px solid var(--line);
  offset-distance: calc(var(--distance, 50) * 1%);
  offset-rotate: calc(var(--rotate, auto) * 1deg);
}
const DISTANCE = document.querySelector('input.distance')
const ROTATE = document.querySelector('input.rotate')
const BLOCK = document.querySelector('.block')
const HD = document.querySelector('h1.distance')
const HR = document.querySelector('h1.rotate')

const updateDistance = e => {
  BLOCK.style.setProperty('--distance', e.target.value)
  HD.innerHTML = `offset-distance: ${e.target.value}%;`
}

const updateRotate = e => {
  BLOCK.style.setProperty('--rotate', e.target.value)
  HR.innerHTML = `offset-rotate: ${e.target.value}deg;`
}

ROTATE.addEventListener('input', updateRotate)
DISTANCE.addEventListener('input', updateDistance)
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.