返回自定义动画对背......登陆

自定义动画对背景色的改变是没有效果的吗?

2018-11-18 22:17:33185

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title>Document</title>
 <style type="text/css">
     div{width: 100px;height: 100px;background-color:blue; position: absolute; margin: 0px ;}
 </style>
 <script type="text/javascript" src="jquery-3.3.1.min.js"></script>
 <script type="text/javascript">
      $(document).ready(function(){
         $('.but').click(function(){
          //document.write("1111");
              $('.but').animate({
                 left:'500px',
                  top:'500px',
                 width:'toggle',
                 background:'pink',
                 opacity:'0.5'
                },2000)
         })
             
      })
        
 </script>
</head>
<body>
    <!--  <button>开始</button> -->
 <div></div>
</body>
</html>

最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送