zoukankan      html  css  js  c++  java
  • jQuery animate(滑块滑动)




    HTML 代码复制到剪贴板
    • <p><a href="#" class="run">Run</a></p>
    • <div id="box">
    • </div>




    CSS 代码复制到剪贴板
    • <style type="text/css">
    • body {}{
    •     margin20px auto;
    •     padding0;
    •     width580px;
    •     font80%/120% Arial, Helvetica, sans-serif;
    • }
    • a {}{
    •     font-weightbold;
    •     color#000000;
    • }
    • #box {}{
    •     background#6699FF;
    •     height100px;
    •     width100px;
    •     positionrelative;
    • }
    • </style>




    JavaScript 代码复制到剪贴板
    • $(document).ready(function(){
    •     $(".run").click(function(){
    •     
    •         $("#box").animate({opacity: "0.1", left: "+=400"}, 1200)
    •         .animate({opacity: "0.4", top: "+=160", height: "20",  "20"}, "slow")
    •         .animate({opacity: "1", left: "0", height: "100",  "100"}, "slow")
    •         .animate({top: "0"}, "fast")
    •         .slideUp()
    •         .slideDown("slow")
    •         return false;
    •     
    •     });
    • });




    效果: http://www.bbon.cn/wp-content/uploads/demo/jquery/chainable-effects.html

  • 相关阅读:
    extJS 创建类
    apache配置虚拟主机
    pdo简单操作
    php上传sae路径问题
    把php上传sae问题要使用IO
    struts2上传的问题
    Could not open Hibernate Session for transaction;
    Convention插件
    struts2支持的结果类型
    struts2动态方法
  • 原文地址:https://www.cnblogs.com/ret00100/p/1636631.html
Copyright © 2011-2022 走看看