材质 - 切换图标



本章解释 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
广告