目录

show()

功能

显示指定的元素。

语法

fx.show(elm, duration, callback)

参数

范例

Example: 缓慢地显示所有隐藏的段落。

<!DOCTYPE html>
<html>

<head>
    <style>
p { background:yellow; }
    </style>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.3/require.min.js"></script>
    <script>
    require.config({
        baseUrl: "./",
        packages: [{
            name: "skylark",
            location: "../../../src/skylark"
        }, ]
    });
    </script>
</head>

<body>
 <button>Show it</button>
      <p style="display: none">Hello  2</p>
    <script>
    require(["skylark/query",  "skylark/finder", "skylark/fx"], function(query,finder, fx) {
       query("button").on("click", function() {
             // query("p").show("slow");
              fx.fadeIn(finder.find("p"), "slow");
        });
    });
    </script>
</body>

</html>