Connecting Circles With Anchor Positioning II

January 08, 2026

Improving the previous implementation to include the calculation of the distance between both circles inside the arrow shape.

CSS-only connected circles with distance

Still the same code structure

<div class="circle" name="--a" size="150px"></div><div class="circle" name="--b" size="100px"></div><div class="arrow" x="--a" y="--b" size_x="150px" size_y="100px"> ...</div>
.arrow {  --r: 25px; --a: 40deg; --d: 5px;  --g: 10px;  --c: #556270;}

Drag the circles in the demo below and see how the value updates:

⚠️ Chrome-only for now ⚠️

And another demo with more than two circles

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.148.4. UTC+08:00, 2026-01-25 07:41
浙ICP备14020137号-1 $Carte des visiteurs$