Materialize 波浪特效
Materialise使用波浪特效,它是一个外部库用来实现Material Design中概述的点击效果。下表提到了可用的类及其效果。
序号 | 类名称及说明 |
---|---|
1 | waves-effect 将波浪效果放在控件上。 |
2 | waves-light 将波浪效果作为白色。 |
3 | waves-red 将波浪效果作为红色。 |
4 | waves-green 将波浪效果作为绿色。 |
5 | waves-yellow 将波浪效果作为黄色。 |
6 | waves-orange 将波浪效果作为橙色。 |
7 | waves-purple 将波浪效果作为紫色。 |
8 | waves-teal 将波浪效果作为蓝绿色。 |
以下是在按钮上使用波浪效果的示例。
例子
materialize_waves.html
<!DOCTYPE html> <html> <head> <title>The Materialize Waves Effects Example</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css"> <script type="text/javascript" src="/attachments/tuploads/materialize/jquery-2.1.1.min.js"></script> <script src="/attachments/tuploads/materialize/materialize.min.js"></script> </head> <body class="container"> <h3>Waves Effects Demo</h3> <div class="collection waves-color-demo"> <div class="collection-item"> <code class=" language-markup">Default</code> <a href="#!" class="waves-effect btn secondary-content">Click Me!</a> </div> <div class="collection-item"> <code class=" language-markup">waves-light</code> <a href="#!" class="waves-effect waves-light btn secondary-content">Click Me!</a> </div> <div class="collection-item"> <code class=" language-markup">waves-red</code> <a href="#!" class="waves-effect waves-red btn secondary-content">Click Me!</a> </div> <div class="collection-item"> <code class=" language-markup">waves-yellow</code> <a href="#!" class="waves-effect waves-yellow btn secondary-content">Click Me!</a> </div> <div class="collection-item"> <code class=" language-markup">waves-orange</code> <a href="#!" class="waves-effect waves-orange btn secondary-content">Click Me!</a> </div> <div class="collection-item"> <code class=" language-markup">waves-purple</code> <a href="#!" class="waves-effect waves-purple btn secondary-content">Click Me!</a> </div> <div class="collection-item"> <code class=" language-markup">waves-green</code> <a href="#!" class="waves-effect waves-green btn secondary-content">Click Me!</a> </div> <div class="collection-item"> <code class=" language-markup">waves-teal</code> <a href="#!" class="waves-effect waves-teal btn secondary-content">Click Me!</a> </div> </div> </body> </html>
结果
验证结果,如下图所示。