Material Design Lite 數(shù)據(jù)表

2018-12-19 18:17 更新

該MDL提供多種CSS類各種預(yù)先定義的外觀和行為增強(qiáng)功能適用于顯示器表作為數(shù)據(jù)表。下表中提到的可用類和它們的影響。

SN 類名稱和說明
1 MDL-數(shù)據(jù)表
標(biāo)識表作為MDL組件,所需的表元素。
2 MDL-JS-數(shù)據(jù)表
設(shè)置基本MDL行為表并需要表元素。
3 MDL-數(shù)據(jù)表-可選
將所有/單個(gè)可選行為(復(fù)選框)和可選;那張表元素。
4 MDL-數(shù)據(jù)table__cell -非數(shù)字
設(shè)置文本格式數(shù)據(jù)的單元格,是可選的;接著兩個(gè)表頭和表數(shù)據(jù)單元。
(沒有)
默認(rèn)情況下,設(shè)置了數(shù)字格式,以頭或數(shù)據(jù)的單元格。

以下例子展示了利用MDL-數(shù)據(jù)表的類來顯示的數(shù)據(jù)表。

mdl_data_tables.htm

<html>
<head>
   <script src="https://atts.w3cschool.cn/attachments/tuploads/materialdesignlite/material.min.js"></script>
   <link rel="stylesheet"  rel="external nofollow" target="_blank" >
   <link rel="stylesheet"  rel="external nofollow" target="_blank" >	  
</head>
<body>
   <table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp">
   <thead>
      <tr><th class="mdl-data-table__cell--non-numeric">Student</th><th>Class</th><th>Grade</th></tr>
   </thead>
   <tbody>
      <tr><td class="mdl-data-table__cell--non-numeric">Mahesh Parashar</td><td>VI</td><td>A</td></tr>
      <tr><td class="mdl-data-table__cell--non-numeric">Rahul Sharma</td><td>VI</td><td>B</td></tr>
      <tr><td class="mdl-data-table__cell--non-numeric">Mohan Sood</td><td>VI</td><td>A</td></tr>
   </tbody>
   </table>
</body>
</html>

結(jié)果

驗(yàn)證結(jié)果。


以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號