zoukankan      html  css  js  c++  java
  • [ jquery 效果 fadeTo([speed,[easing],[fn]]) ] 此方法用于通过调整不透明度的变化至指定目标来实现所有匹配元素的淡入效果,并在动画完成后可选地触发一个回调函数

     此方法用于通过调整不透明度的变化至指定目标来实现所有匹配元素的淡入效果,并在动画完成后可选地触发一个回调函数

    实例:

    <html lang='zh-cn'>
    <head>
    <title>Insert you title</title>
    <meta http-equiv='description' content='this is my page'>
    <meta http-equiv='keywords' content='keyword1,keyword2,keyword3'>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type='text/javascript' src='./js/jquery-1.12.1.min.js'></script>
    <style type="text/css">
        *{margin:0;padding:0;}
        html{font:400 15px/1.2em 'Courier New';color:#666;750px;margin:25px auto;}
        #show{250px;height:400px;background:red;display:none;color:#FFF;line-height:400px;text-indent:8px;padding:10px 30px;margin:70px;text-align:center;}
        button{padding:8px;border:0;outline:none;background:#00E92C;border-radius:2px;}
        .wrapAll{color:#FF96EC;}
    </style>
    <script type='text/javascript'>
        $(function(){
            $('button').click(function(){
                $('#show').fadeTo(1000,.3,'linear',function(){
                    /*
                        实现将透明度调整至指定目标
                    */
                   console.log('fade animate already Finished...');
                });
            });
        });
    </script>
    </head>
    <body>
        <div id='demo'>
            <button type="button">button</button>
            <div id='show'>Test text</div>
        </div>
    </body>
    </html>
  • 相关阅读:
    hdu 3333 树状数组+离线处理
    poj 2352 树状数组 OR Treap
    hdu 1698 线段树
    【概率dp】D. Card Collector
    【分段哈希】H. Paint the Wall
    【置换】G. Poker 2.0
    【概率dp】C. Race to 1 Again
    【dp】D. Caesar's Legions
    【并查集】F.find the most comfortable road
    【算法系列学习】连续邮资问题
  • 原文地址:https://www.cnblogs.com/mysearchblog/p/5619295.html
Copyright © 2011-2022 走看看