jquery自定义动画

Original 2019-05-07 17:22:21 187
abstract:<!DOCTYPE html><html><head>  <meta charset="utf-8"> <title></title>  <style type="text/css">   div{width: 200px;height

<!DOCTYPE html>

<html>

<head>

  <meta charset="utf-8">

<title></title>

  <style type="text/css">

   div{width: 200px;height: 200px;background: blue;position: absolute;color: #fff;}

  </style>

<script type="text/javascript" src="jquery-3.4.0.min.js"></script>

<script type="text/javascript">

$(document).ready(function(){

  $('#right').click(function(){

    $('.box1').animate({left:'+500px'},3000)

    $('.box1').animate({fontSize:'30px'},500)

  })

  $('#stop').click(function(){

    $('.box1').stop(true)

  })

})



</script>

</head>

<body>

<button id="right">右移</button>

<button id="stop">停止</button>

<div class="box1">php中文网</div>


</body>

</html>


Correcting teacher:查无此人Correction time:2019-05-08 09:15:59
Teacher's summary:完成的不错,又看到你了。js和jq都要在每行结束增加;号。继续加油。

Release Notes

Popular Entries