显示指定的元素。
styler.show(elm)
Example: 在对象元素上显示 hide 样式。
<!DOCTYPE html> <html> <head> <style> p { margin: 8px; font-size:16px; } .hide { display:none; color:blue; } </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> <p id="target" class="hide">This is a 'hide' item </p> <p> This is not a 'hide' item </p> <script> require(["skylark/finder","skylark/styler"],function(finder,styler){ styler.show(finder.byId("target"),"hide"); }); </script> </body> </html>