svg { margin:40px; /* give it some margin to show off the axes */ overflow:visible; /* axes will extend beyond the svg cropping area. Show them anyway */ } #container { /* crop circles within axes */ overflow: hidden; } svg circle { r:5; /* circles will have a default radius of 5 px */ transition: r 0.5s ease-in-out, fill 0.5s linear; /* create transitions for radius and fill */ transform-origin: 50% 50%; /* when transforming, do it around the center of the object */ } circle:hover { fill:blue; /* when hovered, make the blue */ r:15; /* make it larger when hovered */ }