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

  • 相关阅读:
    编写一个脚本,用它来操纵QTP的运行
    URLbased 方式和 HTMLbased方式的差别(摘自关河)
    提供软件测试、软件开发相关服务
    数组内容的参数化问题
    IIS状态代码的含义
    不成熟的测试工具
    LR利用foxmail发邮件部分的脚本代码
    FTP的两种模式
    pop3的基本流程
    自动化测试在企业中的实施
  • 原文地址:https://www.cnblogs.com/ret00100/p/1636631.html
Copyright © 2011-2022 走看看