材料 - 警示圖示



本章介紹 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">add_alert</i> add_alert
<i class="material-icons custom">error</i> error
<i class="material-icons custom">error_outline</i> error_outline
<i class="material-icons custom">warning</i> warning
廣告