Materialize-shadows

提供:Dev Guides
移動先:案内検索

マテリアライズ-影

マテリアライズには、コンテナを影付きの紙のようなカードとして表示するための特別なクラスがいくつかあります。

Sr.No. Class Name & Description
1

z-depth-0

デフォルトでZ深度を持つ要素の影を削除します。

2

z-depth-1

1pxの境界線付きシャドウを使用して、HTMLコンテンツのコンテナをスタイルします。 1のz深度を追加します。

3

z-depth-2

2pxの境界線付きシャドウを使用して、HTMLコンテンツのコンテナをスタイルします。 2のz深度を追加します。

4

z-depth-3

3pxの境界線付きシャドウを使用して、HTMLコンテンツのコンテナをスタイルします。 3のZ深度を追加します。

5

z-depth-4

4pxのボーダー付きシャドウを使用して、HTMLコンテンツのコンテナをスタイルします。 4のz深度を追加します。

6

z-depth-5

5pxの境界線付きシャドウを使用して、HTMLコンテンツのコンテナをスタイルします。 5のz深度を追加します。

materialize_shadows

<!DOCTYPE html>
<html>
   <head>
      <title>The Materialize 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 = "https://code.jquery.com/jquery-2.1.1.min.js"></script>
      <script src = "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js">
      </script>

      <style>
         div {
            width : 200px;
            height : 200px;
         }
      </style>
   </head>

   <body class = "container">
      <h2>Materialize Shadow Examples</h2>

      <hr/>
      <div class = "card-panel">
         <p><b>TODO:</b> Learn HTML5</p>
      </div>

      <div class = "z-depth-1">
         <p><b>TODO:</b> Learn HTML5</p>
      </div>

      <div class = "z-depth-2">
         <p><b>TODO:</b> Learn HTML5</p>
      </div>

      <div class = "z-depth-3">
         <p><b>TODO:</b> Learn HTML5</p>
      </div>

      <div class = "z-depth-4">
         <p><b>TODO:</b> Learn HTML5</p>
      </div>

      <div class = "z-depth-5">
         <p><b>TODO:</b> Learn HTML5</p>
      </div>
   </body>
</html>

結果

結果を確認します。