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

  • 相关阅读:
    #最小生成树,Trie#CF888G Xor-MST
    #Tarjan#洛谷 5676 [GZOI2017]小z玩游戏
    #区间dp#CF1114D Flood Fill
    #构造,二分#[AGC006B] [AGC006D] Median Pyramid
    #0/1分数规划#AT1807 食塩水
    #笛卡尔树#洛谷 3793 由乃救爷爷
    #同余最短路#洛谷 2371 [国家集训队]墨墨的等式
    awk命令使用
    k8s快速删除所有退出的pod
    ratticdb密码管理工具安装使用
  • 原文地址:https://www.cnblogs.com/ret00100/p/1636631.html
Copyright © 2011-2022 走看看