move.js的set()沒有效果
<!DOCTYPE html>
<html>
<head>
?<meta charset="UTF-8">
?<title>Document</title>
?
?<style type='text/css'>
??body{
???margin:0;
???padding: 0;
??}
??.box{
???width: 200px;
???height: 200px;
???background-color: #000000;
???margin-left:200px;
??}
?</style>
</head>
<body>
?<div class="box"></div>
?<button id="btn"></button>
?<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/move.js/0.5.0/move.min.js"></script>
?<script type="text/javascript">
?window.onload=function? () {
??document.getElementById("btn").onclick=function() {
???move('.box').set('margin-left',20).end();
??}
??
?}
??
?</script>
</body>
</html>
做了個小小的例子,發(fā)現(xiàn)set()怎么也沒有效果,但其他就有,比如add,sub這些就有,唯獨set沒有???也沒有報錯,求解??!謝謝?。?/p>
2018-06-21
原來是參數(shù)的問題??!set( ' margin-left ', ' 20px ')就可以了!?。??
不過我看官網(wǎng)并沒有這樣哩??