这就是jsfiddle的问题所在...
我测试了你的jsfiddle链接,它并不像你在问题中提到的那样好看。
但是我在我的电脑上创建了一个新页面,复制了你的fiddle中的所有内容并进行了检查。它看起来还不错。
复制并粘贴以下内容,将其保存为html文件并进行测试:
<html>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<link rel="stylesheet" type="text/css" href="http://fiddle.jshell.net/css/normalize.css">
<style type="text/css">
#point {
position: absolute;
background-color: black;
width: 15px;
height: 15px
}
</style>
</head>
<body onload="initPage()">
<div class="start" id="point"></div>
<script type="text/javascript">
var json = [
{'x' : '300' , 'y' : '200'},
{'x' : '250' , 'y' : '150'},
{'x' : '209' , 'y' : '387'},
{'x' : '217' , 'y' : '323'},
{'x' : '261' , 'y' : '278'},
{'x' : '329' , 'y' : '269'},
{'x' : '406' , 'y' : '295'}
];
function initPage() {
$.each(json, function() {
$("#point").animate({
left: this.x,
top: this.y
},
"linear");
});
}
</script>
</body>
</html>