我试图将15个div元素均匀地放在一个半径为的圆圈中150px.我正在使用下面的代码,这似乎给出了一个奇怪的偏心椭圆重叠.
// Hold a global reference to the div#main element. Initially assign it ... somewhere useful :)
var main = document.getElementById('main');
var circleArray = [];
// Move a circle based on the distance of the approaching mouse
var moveCircle = function(circle, dx, dy) {
};
// Look at all the circle elements, and figure out if any of them have to move.
var checkMove = function() {
};
var setup = function() {
for (var …Run Code Online (Sandbox Code Playgroud)