相关疑难解决方法(0)

使用JavaScript将div定位在一个圆圈中

我试图将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)

html javascript css

16
推荐指数
2
解决办法
7587
查看次数

标签 统计

css ×1

html ×1

javascript ×1