材質 - 切換圖示



本章解釋 Google (Material) 切換圖示的使用方法。假設custom是我們在下面示例中定義大小和顏色的 CSS 類名。

<!DOCTYPE html>
<html>
   <head>
      <link href = "https://fonts.googleapis.com/icon?family=Material+Icons" rel =  "stylesheet">
		
      <style>
         i.custom {font-size: 2em; color: green;}
      </style>
		
   </head>
	
   <body>
      <i class = "material-icons custom">accessibility</i>
   </body>
	
</html>

下表包含 Google (Material) 切換圖示的使用方法和結果。將上面程式的<body>標籤替換為表中給出的程式碼,即可獲得相應的輸出:

用法 結果
<i class="material-icons custom">check_box</i> check_box
<i class="material-icons custom">check_box_outline_blank</i> check_box_outline_blank
<i class="material-icons custom">indeterminate_check_box</i> indeterminate_check_box
<i class="material-icons custom">radio_button_checked</i> radio_button_checked
<i class="material-icons custom">radio_button_unchecked</i> radio_button_unchecked
<i class="material-icons custom">star</i> star
<i class="material-icons custom">star_border</i> star_border
<i class="material-icons custom">star_half</i> star_half
廣告
© . All rights reserved.