用Jquery可以实现很多绚丽的效果,如下图,就是各种效果:
<script type="text/javascript">
//下拉框实现背景的变化
     function XX() {   
    //alert($("select[@name='a'] option[@selected]").text()); 
      $("#a").val('1'); 
        var X = $("select[@name='a'] option[@selected]").attr("value"); 
          $(document.body).css("background", X );  }
          </script>
               <select ).toggle() ;//切换隐藏或显示
  })
})

 //放大
        $(function (){
        $("#btn1").click(function(){
        $("#div1").animate( { width: "90%"}, { queue: false, duration: 5000 } )
                  .animate( { fontSize: '10em' } , 1000 )
                  .animate( { borderWidth: 5 }, 1000);
            })
        $("#btn2").click(function(){
        $("#div2").animate( { width: "90%"}, { queue: false, duration: 5000 } )
                  .animate( { fontSize: '10em' } , 1000 )
                  .animate( { borderWidth: 5 }, 1000);
            })
             $("#stop").click(function(){
         $("#div2").stop();
         })
        })
        $(function (){
        // 开始动画
        $("#go").click(function(){
        $("#images").animate({left: '+200px'}, 5000);
        })
        // 当点击按钮后停止动画
         $("#stop").click(function(){
         $("#images").stop();
         })
        })
        //执行一个禁用的动画
        $(function (){
        jQuery.fx.off = true;
        $("#if").click(function(){
        $("#images").toggle("slow");
  });

        })


    </script>

相关文章:

  • 2022-12-23
  • 2021-12-15
  • 2021-09-28
  • 2021-10-08
  • 2021-10-20
  • 2021-09-05
  • 2021-12-28
猜你喜欢
  • 2021-10-08
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案